Secure image does not work using PSoC Creator - KBA225991

Author: richardm_61           Version: **

 

Question:

Why does secure image not work with PSoC Creator?

 

Answer:
Versions 1.20 and lower of the secure image do not support system calls (SysCall) that use the IPC DATA register as a value in the register, rather than a pointer to a memory location. For this reason, a system call that passes a value rather than a pointer, will lead to a hard fault. Cy_SysPm_LdoSetVoltage() and Cy_SysPm_BuckSetVoltage1() functions are examples of this type of system calls. Depending on the chosen power mode in the Design-Wide Resources System Editor, one of these is called from the Cy_SystemInit() function in the cyfitter_cfg.c file. To work around this issue, remove this function call.

This problem is only an issue if you need to remap system calls. Most applications do not need to do this and may comment out or remove the following lines of code in the secure image main() function in the main.c file.

/* SysCall configuration */

errorStatus = Cy_SI_ConfigSysCall();

if(errorStatus != CY_SI_SUCCESS) { Cy_SI_ErrorTask(); }

If these lines are commented or removed, there is no need to modify cyfitter_cfg.c.