User Tools

Site Tools


manual:usb_demo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
manual:usb_demo [2018/07/04 14:51]
voorburg [Using Microboot]
manual:usb_demo [2018/07/27 23:29]
voorburg [Notes]
Line 42: Line 42:
 ===== Notes ===== ===== Notes =====
  
-When using USB as the communication interface, ​it is not recommended to use the default backdoor functionality,​ which keeps the bootloader active ​for short time after resetIn theory it works, however the time that the backdoor stays open should be at least long enough ​for the installation of the USB driver ​on the host PC. This is hard to estimate and relatively longcausing long delays between a system reset and the actual starting of the user program. +When using USB as the communication interface, the bootloader ​stays active a bit longer than usual. This extension ​time can be configured via configuration macro BOOT_COM_USB_BACKDOOR_EXTENSION_MS in “blt_conf.h”. This extra time is needed ​for the USB device to enumerate ​on the PC, to the point that the bootloader ​can detect firmware update requests
- +
-It is recommended ​to implement a custom backdoor solution in this case. This is achieved by setting configurable BOOT_BACKDOOR_HOOKS_ENABLE to a value of 1. +
- +
-<​code>​ +
-#define BOOT_BACKDOOR_HOOKS_ENABLE ​     (1) +
-</​code>​ +
- +
-You can now implement your own backdoor solution in the hook-functions **BackDoorInitHook()** and **BackDoorEntryHook()**. Refer to the demo programs for an example. There, a solution is implemented where the bootloader ​will always stay active after a reset if a specific digital input had a pre-defined value during reset+
  
 +This time might not be long enough in the situation where the USB driver was just installed on the host PC and the USB enumeration takes place for the first time. For this reason it is highly recommended to implement an additional method to force the bootloader to stay active. This latter case happens when the CpuUserProgramStartHook()-function is enabled and returns BLT_FALSE. All OpenBLT demo programs that support firmware updates via USB have such a method implemented for forcing the bootloader to stay active. Typically if a push-button stays pressed for a few seconds during and after a microcontroller reset. Refer to the CpuUserProgramStartHook()-function ​ in the bootloader demo programs for more details.
  
manual/usb_demo.txt · Last modified: 2023/06/27 09:35 by voorburg