Bootloader

The bootloader is available for the SAM R34 as a separate application, which allows the user to Flash an application image into the board without the use of an external debugger. After Reset, the board listens on the serial port (UART) for the image update request for 200 ms. If an update request is received within that time, the MCU then waits for the image, which it then writes into the board's internal Flash and loads the new image during the next Reset.

The PC utility image Bootloader_PC_tool_setup supplied with the package is necessary to Flash the image into SAM R34. Upon Reset the software takes the application image in Motorola, S-record hexadecimal format (S-REC) and sends the image via the serial interface to the target MCU. The bootloader is configured to write the application image to Flash, starting from location 0x2000. The application must be build to load from location 0x2000. The package contains a preconfigured linker script for this purpose. The linker script for non-bootloader project is available in the path sam0\utils\linker_scripts\samr34\gcc\samr34j18b_flash.ld. The linker script for bootloader project is available in the path thirdparty\wireless\lorawan\utils\bootloader\samr34j18b_flash.ld.

Figure 1. Bootloader Organization in SAM R34