USB-UART STM32L0
Whenever we connect a DISCOVERY KIT to computer via USB, we see a drive by the same name as the controller. How is this achieved?
Also, it allows drag and drop of .bin files for flash. How can this be achieved?
Whenever we connect a DISCOVERY KIT to computer via USB, we see a drive by the same name as the controller. How is this achieved?
Also, it allows drag and drop of .bin files for flash. How can this be achieved?
It's a part of mbed specification (disk abstraction provided by the st-link) to simplify device programming:
https://os.mbed.com/handbook/How-mbed-works#how-programming-works
How programming worksWhen you plug in an mbed Microcontroller in to your PC using USB, it appears like a USB flash disk. This small disk is presented by the mbed Interface, and allows you to save ARM microcontroller binaries you want to run directly on to the mbed, without needing drivers. Note that when you save a binary file to the mbed disk, it is not immediately loaded in to the internal microcontroller FLASH memory.
When you hit reset, the
https://os.mbed.com/handbook/mbed-interface
looks at the disk for the newest .bin file it can find. If there is a new file, it will load it in to the microcontroller's internal FLASH memory using the JTAG interface. If the newest binary is already loaded, it won't load it again. It then starts the microcontroller running.This means if you hit reset again, it will simply reset the target microcontroller and start it running again, as the latest binary is already loaded.
If there is no binary on the mbed disk, the target microcontroller will simply be kept held in reset.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.