CANopen Bootloader Documentation
Version 4.10.00
|
Access to the Flash memory is done via three callback functions. They are called when data is written to the CANopen objects 1F50h and 1F51h by a CANopen Program Download Tool.
CblMgrBufferStore() | Store program / data in flash memory, callback function in |
CblMgrFlashDelete() | Delete program / data in flash memory, callback function in |
CblMgrFlashFinalize() | Finalize program / data in flash memory, callback function in |
The next figure gives an overview of the involved CANopen objects during program download.
The following global variables are used inside the callback functions.
Variable | Access | Description |
aulIdx1F56_SoftIdentG[] | write | CRC value of program, CANopen access via 1F56h |
aulIdx1F57_FlashStatusG[] | write | Flash status, CANopen access via 1F57h |
ubCblMgrBufferStoreG[] | read/write | Write value 0 to mark the end of a flash operation |
The function CblMgrFlashDelete() is called by the CANopen Bootloader upon reception of a program erase command in object 1F51h. The following code has to be adopted to the target system.
The following flowchart shows the interaction upon writing the Erase command or a Manufacturer-specific command to index 1F51h inside the object dictionary.
The function CblMgrBufferStore() is called by the CANopen Bootloader after a certain amount of data has been copied to the internal RAM of the target system by the CANopen Download Tool. The following code has to be adopted to the target system.
The function CblMgrFlashFinalize() is called by the CANopen Bootloader after all data has written to the target system. The following pseudo code has to be adopted to the target system.