SPNA241 August   2019 RM41L232 , RM42L432 , RM44L520 , RM44L920 , RM46L430 , RM46L440 , RM46L450 , RM46L830 , RM46L840 , RM46L850 , RM46L852 , RM48L530 , RM48L540 , RM48L730 , RM48L740 , RM48L940 , RM48L950 , RM48L952 , RM57L843 , TMS570LC4357 , TMS570LC4357-EP , TMS570LC4357-SEP , TMS570LS0232 , TMS570LS0332 , TMS570LS0432 , TMS570LS0714 , TMS570LS0714-S , TMS570LS0914 , TMS570LS10106 , TMS570LS10116 , TMS570LS10206 , TMS570LS1114 , TMS570LS1115 , TMS570LS1224 , TMS570LS1225 , TMS570LS1227 , TMS570LS20206 , TMS570LS20206-EP , TMS570LS20216 , TMS570LS20216-EP , TMS570LS2124 , TMS570LS2125 , TMS570LS2134 , TMS570LS2135 , TMS570LS3134 , TMS570LS3135 , TMS570LS3137 , TMS570LS3137-EP

 

  1.   CAN Bus Bootloader for Hercules Microcontrollers
    1.     Trademarks
    2. Introduction
    3. Hardware Requirements
    4. CAN Settings
    5. Software Coding and Compilation
    6. Exception Vector Table
    7. ECC Generation for Bootloader Code
    8. ECC Generation for Application Code
    9. During Bootloader Execution
    10. Bootloader Flow
    11. 10 CAN Bootloader Operation
    12. 11 CAN Bootloader Protocol
    13. 12 Create Application for Use With the Bootloader
    14. 13 Sample Code for PC-Side Application
    15. 14 References

ECC Generation for Application Code

As stated in Section 6, the ECC values for all of the ATCM program memory space must be programmed into the flash before SECDED is enabled. Before transferring the application image, the address and the image size are transferred first. The bootloader erases the flash sectors based on the address and size, and the ECC area corresponding to those flash sectors. If the image size is not equal to size of one flash sector or multiple sectors, the un-programmed area in the last erased sector contains ECC error.

One way to avoid this ECC error is to fill the un-programmed area by appending 0xFFFFFFFF to the file.

MEMORY { VECTORS (X) : origin=0x00010020 length=0x00000020 /*sector 4/5 are used for application */ FLASH_CODE (RX) : origin=0x00010040 length=0x8000 - 0x40 fill=0xFFFFFFFF FLASH0 (RX) : origin=0x00018000 length=0x00200000 - 0x18000 FLASH1 (RX) : origin=0x00200000 length=0x00200000 STACKS (RW) : origin=0x08000000 length=0x00001500 RAM (RW) : origin=0x08001500 length=0x0007EB00 }