This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USB hot plug device crashes

I used dfu_bootloader with integrated usb function to perform jump application test, and found that after the disk is mounted to the computer, if the device is not removed on the computer side, unplug the usb, the bootloader jumps to the application, and the jump will occur probabilistically;

1. Current test conclusion:

1) Before unplugging usb and bootloader to jump to the application, remove the usb device on the computer and bootloader will jump to the application
Always normal;

2. Test procedures
There is no transplantation of bootloader jump application program based on development board;

3. Have you encountered the same problem?
Ask you if you encounter the problem that the disk cannot be removed without removing the computer, can you give some suggestions;

4. Personal speculation
1) After removing the disk device on the computer, unplug usb to boot application normally, it should be
The usb protocol sends the transplant command, so it can be disconnected normally and jump to the application from the bootloader;
The problem lies in the hot swap protocol end;

  • Hi Mars,

    I would need to have more information about your bootloader and your application. Please give more information on : 

    - What would your bootloader do ? Which bootloader did you use? is it USB bootloader or BLE bootloader?  I'm not sure I fully understand what you meant by "Unplug the usb, the bootloader jumps to the application and the jump will occur probalilistically"

    - What would your application do ? 

    Note that our USB bootloader for the PCA10059 automatically enter DFU mode if the device has a soft reset. So if you unplug USB cable and for some reason the application reset the chip then it will enter DFU mode. 

    Please check if there is any assert when you unplug the USB cable without removing the disk. 

    Please try to reproduce the issue on the PCA10056 DK so that we can test here.

Related