EmbeddedCAN-uCBootloader
Overview[edit | edit source]
This bootloader resides in ROM and flashes an application starting at address 0xA000. The communication interface used is CAN.
Upon reset, depending on certain conditions, the bootloader exhibits the following behavior:
- If application code is present, and application has set 'bootloader flag' in NVM, stay in bootloader for period of 10 seconds.
- If application code is present, and application has NOT set 'bootloader flag' in NVM, stay in bootloader for period of 5 seconds.
- If NO application code is present, stay in bootloader indefinitely.
Once the bootloader is executing, it will broadcast a 'heartbeat' message whose data structure is outlined in 'M:\rfid_appliance\VRReader\docs\VR uC Command Interface.xlsx'.
This message includes the serial number of the device. Internally, the bootloader will only accept CAN packets that are sent with an extended ID that matches
the aforementioned serial number. Once communication is established by sending a supported command (VR internal command or 'ping' command) with the correct
CAN EID, the bootloader will be 'connected' and stop broadcasting the 'heartbeat' message. Writing the flash memory can then commence.
Version History[edit | edit source]
- 1.0: Initial release, which includes support to switch to FEI (default) clock mode before jumping to application
Programming Microcontroller Bootloader[edit | edit source]
- Click the blue icon of a lightning bolt, which is the “Flash Programmer”.
- Under Connection, click New…
NOTE: If this window already resembles the one in Step 5, continue from Step 5.
- Under Name:, enter “Kinetis Connection”. Under Target, click New….
- Enter the information as seen below. For 'Initialization target', select the path as: (In this case, the user was ‘sam’, but this may vary between different PC’s.) C:\Users\sam\svn\projects\linuxboarduC\linuxboard4.x\Debugger\init_kinetis.tcl
Under the Memory tab, for 'Memory Configuration', select the path as: (In this case, the user was ‘sam’, but this may vary between different PC’s.) C:\Users\sam\svn\projects\linuxboarduC\linuxboard4.x\Debugger\K20DX256M7.mem
- Click Finish. Then, specify the File to Flash: (In this case, the user was ‘sam’, but this may vary between different PC’s.) C:\Users\sam\svn\projects\embedded_bootloader_k20_can\vr_release\vr_embedded_bl_can_1.0.elf
- Click Erase and Program. After a few moments, the console window should display "Program Command Succeeded".
- Reset the microcontroller using the reset button.






