- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
I am using CY8CKIT-062-BLE kit, PSoC Creator 4.2 (4.2.0.641)
My idea is using CM4 core to capture GPIO interrupt (SW2 button), set a flag variable then using CM0 to do something (such LED toggling...) when this flag variable is set.
GPIO Int is handled by CM4 core, so that I MUST place "User_GPIO.c" file in CM4 folder (otherwise i got error with variable &SysInt_Switch_cfg).
In this "User_GPIO.c" I created 2 functions: User_SetVal_Pin_SW2_Int_Flag(), and User_GetVal_Pin_SW2_Int_Flag() to clear and get value of that interrupt flag, respectively. Their prototypes are also declared in "User_GPIO.h" under folder "Shared Files" .
Core CM0 processes general system events by calling function Get_Event() which calls to User_GetVal_Pin_SW2_Int_Flag() to check the Int_flag continuously.
Function Get_Event() located in "User_Event_Interface.c", and this c file already got this line #include "User_GPIO.h" .
However, i got build error with msg PSoC6_IoT.cydsn/User_Event_Interface.c:49: undefined reference to `User_GetVal_Pin_SW2_Int_Flag'
Can anyone please help me to fix this?
Solved! Go to Solution.
- Labels:
-
ispn:39619:1:0
-
l1:314:1:0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please let me summarize.
1) Two functions SetVal and GetVal are declared in the CM4 firmware.
2) The function GetVal is called from the CM0 firmware.
In this case, there is a problem that it is not possible to call a function for CM4 from CM0.
If you want to use a common storage area from CM0 and CM4, please use the Inter Processor Communication (IPC) module. Please refer following documents.
AN215656 - PSoC 6 MCU Dual-CPU System Design
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please let me summarize.
1) Two functions SetVal and GetVal are declared in the CM4 firmware.
2) The function GetVal is called from the CM0 firmware.
In this case, there is a problem that it is not possible to call a function for CM4 from CM0.
If you want to use a common storage area from CM0 and CM4, please use the Inter Processor Communication (IPC) module. Please refer following documents.
AN215656 - PSoC 6 MCU Dual-CPU System Design