Firmware Download - MACH SYSTEMS CANFD-LIN-GW User Manual

Table of Contents

Advertisement

if (RxHeader.Identifier==0x1fffffff && datalen == 4
&& RxData[0] == 0 && RxData[1] == 1 && RxData[2] == 2 &&
RxData[3] == 3)
{
}
In main while loop:
if (bootloaderRequest)
jumpToBootloader();
B. By hardware
For hardware versions lower than v1.3 (incl.), it is necessary to open the enclosure in
order to access the boot-enable pads located on the top layer of the PCB:
For hardware versions as of v1.4, SW1 switch can be used to enter the system
bootloader on power-up:
Firmware can be flashed as described in 5.2.2

5.2.2 Firmware Download

The STM32CubeProgrammer application can be used for flashing firmware over the system
bootloader. The application is available from [4].
Note: If the device is powered over USB, the system bootloader allows flashing over USB only. In case
it is desired to flash the device over, say, RS-232, the external power has to be supplied to the device
and the USB shall remain disconnected.
Steps for uploading a firmware:
1. Open STM32CubeProgrammer application (see download link above)
2. Turn the device off
3. Enter the system bootloader as described in 5.2.1
4. Connect one of the following ports to the PC:
a. Micro USB cable (this also powers the device)
MACH SYSTEMS s.r.o.
/* Cannot go to bootloader directly from ISR */
bootloaderRequest = 1;
return;
Disconnect the USB and the external power supply
Open the enclosure
Short the boot pads together (a pair of tweezers can be used)
Connect the power supply - either USB or external
The device will enter the system bootloader
Release the boot pads
Firmware can be flashed as described in 5.2.2
Close the enclosure
Disconnect the USB and the external power supply
Press and hold SW1
Connect the power supply - either USB or external
The device will enter the system bootloader
Release SW1
CAN FD LIN Gateway - User Manual
www.machsystems.cz
info@machsystems.cz
Page 11 of 18

Advertisement

Table of Contents
loading

Table of Contents