keypunch wrote:I just cannot remember from my past months of reading and not able to find yet (how happens most of time seems) in searching a few times in last day if one has to always use the "reset" button to allow dfu-util to load the bin to board.
keypunch wrote:I also need to figure out if, and if so, how to download the existing bootloader in case I need or wish to load it back onto the board.
danieleff wrote:keypunch wrote:I just cannot remember from my past months of reading and not able to find yet (how happens most of time seems) in searching a few times in last day if one has to always use the "reset" button to allow dfu-util to load the bin to board.
Use the tools/linux/maple_upload script to upload. This script will:
- Reset the board by sending a special sequence to it on Serial USB. (dummy_port is important.)
- Run dfu-util as you did
danieleff wrote:keypunch wrote:keypunch wrote:I also need to figure out if, and if so, how to download the existing bootloader in case I need or wish to load it back onto the board.
Here are bootloader binaries: https://github.com/rogerclarkmelbourne/ ... 1/binaries
Use maple_mini_boot20.bin for your MM clone.
zmemw16 wrote:getting the MM(blue/red pills as well) into dfu mode (lsusb 1eaf:0003) seems a bit awkward.
it frequently takes me 4 or 5 attempts when i even try, press reset and button1, release reset, release button1
........................................................................ -------------- 1 ------------- ------ 2 ------- -------- 3 ---------
action '3' inside the 'first (fast) blinking' led time, success is a much slower continous blink.
with my large hands its a pain, so regardless i tend to wire up a stlink usb stick on 22/21 (22 clk 21 dat)
i also tend to connect a usb/uart module on a9/a10 as well. no supplies to them just the gnd.
Code: Select all
Bus 002 Device 003: ID 1eaf:0004
getting the MM(blue/red pills as well) into dfu mode (lsusb 1eaf:0003) seems a bit awkward.
RogerClark wrote:You don't need to set a jumper or press a button if things are working OK
After the compile is finished, Maple upload script gets run by the IDE which then sends a magic sequence to the USB Serial in the sketch, which causes it to JUMP to zero and exec the bootloader.
But if you have not selected the COM port (Serial USB) for the sketch code this is not possible as the upload script won't know which port to send the magic number to
RogerClark wrote:The idea with Boot1 is for non MM boards. On the MM the "Button" is connected to boot0 and boot1 is floating. Boot1 floating is a hardware error in the design and I have found it prevents the board going into its internal serial uploader which is needed if you want to reflash the bootloader on the MM
RogerClark wrote:I pull boot1 low via 10k on my MMs if I want to upload via serial
RogerClark wrote:The Boot1 think on the Jump link is just for non MM boards as they only have a reset button not a User Button.
RogerClark wrote:On the MM it can be tricky to enter perpetual bootloader because the User button is not boot0, so if you press and hold while pressing and releasing reset, you end up in the STM32's own internal Serial bootloader not the MM bootloader
You have to press and hold the User Button after you have released the reset button, but its a limitation of the hardware not the bootloader
RogerClark wrote:Just to reiterate
DFU is only available for a few seconds after the bootloader starts (Unless you can press the button on the MM after pressing reset)
RogerClark wrote:Note. In the original firmware, if you hold down the button too long it is also ignored (I didnt write the bootloader so this is by design by Leaflabs)
The newer bootloader is better, I think you can hold the button in and it stays in DFU mode.
If you don't press the button, after a few secs there is no DFU upload data, the bootloader checks if there is a sketch in flash and if so it jumps to the sketch. If no sketch is present, I think the booloader resets and tries again
RogerClark wrote:Note the old / original bootloader checks for a sketch in RAM as well as Flash, but the RAM option was removed as its virtually impossible to fit a meaningful sketch in and it also wastes 3K of the 20K RAM doing this, as the bootloader has to preserve its vars in RAM and Leaflabs allocated 3K to the bootloader for this.
RogerClark wrote:On the new bootloader it free's up all the RAM and only runs sketches from flash
RogerClark wrote:NOte. The bootloader only provides DFU, not Serial
The sketch only provides Serial (not DFU)
The bootloader does not run after the code jumps to the sketch, and vice versa
Users browsing this forum: No registered users and 1 guest