CY862 system reset from M4

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
mrsinger
Level 1
Level 1
First solution authored 5 sign-ins First reply posted

I am using the bootloader in CE213903.  Two questions:

1) how do I get may app to create the generated files cy_bootload.c etc as in the app1 example.

2) I am calling NVIC_SystemReset(); to reset the M4 and expected it to return to the bootloader, but my app just runs again.  How do I get the bootloader to run again?   All Cy_Bootload_ExecuteApp(0u); does is set the appid and call NVIC_SystemReset. Or am I missing something obvious.

 

 

 

0 Likes
1 Solution
RavikiranH_01
Employee
Employee
10 sign-ins 25 replies posted 10 replies posted

@mrsinger 
1. I would recommend using DFU Basic code example in Modustoolbox  https://github.com/Infineon/mtb-example-psoc6-dfu-basic.You can use the functionalities defined in latest DFU MW (https://github.com/Infineon/dfu) cy_dfu.c. 

2. Cy_DFU_ExecuteApp() sets the APPID and then resets. On device reset, Cy_DFU_OnResetApp0() is called from main.c; This API determines whether to boot to Bootloader or App based on the APPID set. So, directly calling  NVIC_SystemReset() won't work. Please use Cy_DFU_ExecuteApp(0) to boot to Bootloader. 

 

View solution in original post

0 Likes
3 Replies
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @mrsinger ,

Which device are you using ?

What is CY862?

Regards,

Alakananda
0 Likes

CY8C6247FDI-D32

0 Likes
RavikiranH_01
Employee
Employee
10 sign-ins 25 replies posted 10 replies posted

@mrsinger 
1. I would recommend using DFU Basic code example in Modustoolbox  https://github.com/Infineon/mtb-example-psoc6-dfu-basic.You can use the functionalities defined in latest DFU MW (https://github.com/Infineon/dfu) cy_dfu.c. 

2. Cy_DFU_ExecuteApp() sets the APPID and then resets. On device reset, Cy_DFU_OnResetApp0() is called from main.c; This API determines whether to boot to Bootloader or App based on the APPID set. So, directly calling  NVIC_SystemReset() won't work. Please use Cy_DFU_ExecuteApp(0) to boot to Bootloader. 

 

0 Likes