Tool/software: Code Composer Studio
Hi Team,
I am working on CAN bootloader for TMS320F28379D. I send all hex data via PEAK CAN analyzer from PC to DSP. Currently there is no control of fails on CAN bus, so all hex frames are sent with just delay between frames. I am planning to add checksums of all data blocks and addresses in future. Flash API didn't detect problems when data is programming to FLASH.
Bootloader is placed in FLASHA and FLASHB and main application is placed in flash blocks begins from FLASHC.
I have done a few different tests:
1. Check if the data frames are placed correctly in FLASH sectors with correct hex data and end its work after got length of block equal 0x0000 as it is depicted in TRM.
2. Program main program via JTAG to FLASHC with erasing all flash sectors and then program bootloader to FLASHA and FLASHB. After that, I am sure that both programs are placed correctly in FLASH memory. Using a pointer to _c_int00 I jump to begin of the main app and it works very well.
static void(*APPEntry)(void);
APPEntry = (void(*)(void))(entryAdress);
ESTOP0;
(*APPEntry)();
3. I used an application to send data via CAN and place it on appropriate sectors in FLASH via bootloader which is placed in FLASHA and B. So then I tried to jump to the main application and bootloader jumps to ILLEGAL ISR().
I am pretty sure that the data is received and placed correctly but main application didn't start and after jump bootloader program stays in bootloader ILLEGAL ISR() (at address 0x08042E).
My FLASH API configuration is the same as in serial_flash_programming example. I program flash with ECC enabled. My interrupts are enabled because I would like to use interrupts to initialize boot process. Interrupts works correctly if I program both programs via JTAG and jumps between applications from CSS so I assume if I program flash via CAN bus, the interrupts should also work.
I added vie appendixes with source code and .cmd files for both applications.
In both programs epwm interrupts are working and different programs sends different data via CAN so I can check which program is working in appropriate time.
Thank you for your help.
Mateusz Stasiak