Custom bootloader for CY8C58LP

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

cross mob
Anonymous
Not applicable

Hello everyone,

I'm trying to create a custom bootloader for CY8C58LP using the PSOC Creator.

Both the bootloader and the application work fine individually.

However, when the execution jumps from the bootloader to the application, the application doesn't behave as expected.

As UDB modules the bootloader uses mainly the UART and SPI which are used by the application as well.

1. I've tried first to create the bootloader without any knowledge of the application UDB - modules. I wanted it to be generic.

However, nothing was working when I was launching the application, not even the UART which was obviously the same.

2. Then I decided to have the exact configuration for the bootloader as for the application, at least to have something working.

Basically I copied the application project with all its settings in the TopDesign.cysch, so the same blocks are shared by the bootloader.

Now jumping to the application works much better: UART works fine, interrupts are OK (I see the time tick incrementing OK).

However, SPI is dead (it is not using interupts). I have noticed that the SPI module doesn't even show under PSOC Debug->Components.

Also, from time to time I get a surious interrupt and execution gets stuck in the Cm3Start.c::CY_ISR(IntDefaultHandler)

I've traced the code from the application Cm3Start.c::Start_c() and it goes through the __libc_init_array and everythin, cyfitter.c and

initialize_psoc(that's where the interrupts are properly setup and the vector is moved into RAM belonging to the application).

Most likely something is missing, but not sure what.

Any help would be greatly appreciated.

0 Likes
6 Replies