MACH ETH - User Manual
MACH SYSTEMS s.r.o.
Page
12
of
20
Figure 9 Ethernet bootloader
5.5
How to enter Bootloader
There are four ways to enter the bootloader:
A.
Programmatically from application
The user can call
jumpToBootloader
() function whenever he wants to enter the
system bootloader. Do not to call the function directly from an interrupt routine.
It is suggested to enable at least one way to programmatically enter the system
bootloader. In the example application, there are two bootloaders -> two
bootloaders addresses. One for the system bootloader second for Ethernet
bootloader. An example how is bootloader call (taken from source code example):
/* Request going to the bootloader and do not do anything
else
–
another task will manage this */
BootloaderRequest = pRxPkt->Data[0] == 0 ? 1 : 2;
/* Can not wait infinitely here, as the request is
managed by another task and as this function can be
called from interrupt, the task would never
be scheduled! */
In the other task in infinite loop:
if (BootloaderRequest == 1)
jumpToBootloader(SYSTEM_BOOT_ADDR);
else if (BootloaderRequest == 2)
{
jumpToBootloader(HTTP_BOOT_ADDR);
}
B.
By hardware
To enter the bootloader open the enclosure to access the boot-enable pads located
on the top layer of the PCB. There are two pads one for the system bootloader
second for the Ethernet bootloader. The steps for system bootloader:
•
Disconnect the USB and the external power supply
•
Open the enclosure