For development and maintenance of embedded control hardware, a practical firmware-loading path can simplify application updates and testing. The SAMG55J19 serial bootloader on PL360G55Cx-EK evaluation boards accepts an application binary over either USB or the mikroBUS UART interface, then writes the image to the microcontroller’s internal Flash. A PC can act as the host, or another MCU or MPU can send the file using the bootloader’s serial protocol.
The bootloader is intended for use with Microchip PLC stacks such as G3 and PRIME, but it can also be used with non-PLC applications. Understanding its interface options, command sequence and recovery requirements helps engineers and integrators plan a reliable firmware-loading workflow.
How the SAMG55J19 serial bootloader works
The bootloader runs on the SAMG55J19 and receives an application image in binary (.bin) format. It temporarily handles the transfer using a RAM buffer and programs the application into the MCU’s internal Flash. The PL360G55Cx-EK boards covered by the package are the PL360G55CB-EK and PL360G55CF-EK.
The embedded bootloader is preprogrammed on these boards. Its firmware package includes the bootloader source code, configuration and header files, an IAR Embedded Workbench project, a precompiled bootloader image and a Windows USB driver file. The source and project files are useful when the bootloader needs to be inspected or modified; the precompiled image is available for restoring or upgrading the bootloader itself.
Choose USB or mikroBUS UART
The bootloader supports two serial paths, and it scans enabled interfaces sequentially for the required handshake. This allows either supported connection to be used without changing the basic firmware-loading process.
- USB: The SAMG55J19 USB connection appears on the PC as a virtual COM port. On Windows versions earlier than Windows 10, the supplied CDC driver INF file may be needed.
- mikroBUS UART: The bootloader uses the SAMG55J19 USART4 peripheral, available at the mikroBUS TXD, RXD and GND pins. The host must be connected to these signals appropriately; a USB-to-UART converter may be needed to connect to a PC.
The documented default serial settings are 115200 baud, 8 data bits, no parity, one stop bit and no flow control. The USB module can negotiate baud rate, so another value may be used for USB. The same default settings apply to the UART interface.
Preparing the host and board
Before starting, unpack the firmware package and connect the evaluation board to a PC over USB or UART. Install and open a terminal emulator, then select the COM port associated with the board and configure its serial parameters. The bootloader starts in Terminal mode by default and echoes received characters, so disabling the terminal emulator’s local echo avoids displaying each character twice.
Use the PROG (J2) jumper to put the board into the programming workflow. With the host connected, type # in the terminal to check communication. A prompt indicates that the bootloader has responded. The V# command displays bootloader version information. If a command is entered incorrectly, ESC can be used to begin a new command sequence.
One board-level caution is especially important: using the ERASE (J3) jumper erases the SAMG55 Flash memory, including the serial bootloader. Avoid treating this jumper as a routine step in application updates. If the bootloader is erased, it must be programmed again through JTAG.
Transferring an application binary
To begin an application transfer from a PC, use the bootloader’s S command. It takes a hexadecimal RAM address for a temporary buffer and the application file size in bytes, also in hexadecimal. For example, the documented command S20010000,25452# specifies a buffer address of 0x20010000 and a file size of 0x25452 bytes.
After the command is accepted, the bootloader waits for the binary transfer. Send the application file in binary format. When using UART, select the XMODEM-CRC protocol in the terminal emulator for the file transfer. The prompt returns when the upload is complete. Enter G# to start the loaded application. If the application is running, remove the PROG jumper and reset the board.
When the host is another MCU or MPU rather than a PC, the host application must implement the serial protocol expected by the embedded bootloader. This requires more than sending arbitrary file bytes: the host must follow the bootloader’s command and transfer sequence.
Commands and bootloader recovery
The command interpreter supports more than application upload. Its case-sensitive commands include N for Normal Mode, T for Terminal Mode, V for version information and G to run the application. Memory-access commands can read a byte (o), half word (h) or word (w); R receives a file, while S sends a file to the target.
If the serial bootloader is absent or needs an upgrade, the supplied precompiled bootloader image can be flashed to the SAMG55J19 over JTAG. The documented procedure uses a JTAG adapter connected to the board’s J7 connector and Atmel Studio 7’s Device Programming window. Select the ATSAMG55J19 device and JTAG interface, program the bootloader binary from the package’s bin folder, then enable the GPNVMBITS.BOOT_MODE check in the GPNVM Bits tab and program that setting. Some JTAG adapters require a 20-to-10-pin adapter for this connection.
Practical implications for engineering teams
The PL360G55Cx-EK bootloader provides a defined route for loading application firmware without relying on a custom programming host for basic PC-based transfers. Teams should verify the board variant and COM port, use the correct serial settings, follow the command syntax and select XMODEM-CRC for UART file transfer. They should also preserve the bootloader when working with the ERASE jumper and keep the JTAG recovery procedure in mind. These steps make the update process clearer for development, integration and board servicing.
Access Official Technical PDF