CAN FD LIN Gateway - User Manual
MACH SYSTEMS s.r.o.
Page
11
of
18
if (RxHeader.Identifier==0x1fffffff && datalen == 4
&& RxData[0] == 0 && RxData[1] == 1 && RxData[2] == 2 &&
RxData[3] == 3)
{
/* Cannot go to bootloader directly from ISR */
bootloaderRequest = 1;
return;
}
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:
•
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
For hardware versions
as of v1.4
, SW1 switch can be used to enter the system
bootloader on power-up:
•
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
•
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)