After I loaded the bootloader2.0, using both the sketch and directly loading the binary (no difference), it seems I'm only able to download a new sketch if I manually hit the reset button just before the download starts. Well, after downloading the new bootloader the first sketch download works, but subsequent downloads need the reset button pressed.
Mac OSX 10.10.2
Maple Mini clone, BAITE BTE14-07 (http://www.aliexpress.com/item/leaflabs ... 64071.html)
Arduino_STM32 (not sure of build, or version, or ??, but I grabbed from GitHub Aug 4, 2015)
Steps I took:
- With only a USB cable connected to the board (which gives me a device of /dev/cu.usbmodemfa131)
- With the original bootloader loaded, load the maple_mini_bootloader_updater sketch. Open the serial window, reply Y, all good, no errors.
- I set the Bootloader version to Bootloader 2.0 in the Tools menu and I'm able to immediately load a new (different) sketch. Nice and REAL fast, no real errors.
- Then I try to load the same sketch again:
Code: Select all
/Users/olaldk/Documents/Arduino/hardware/Arduino_STM32/tools/macosx/maple_upload cu.usbmodemfa131 2 1EAF:0003 /var/folders/cv/nnms9czs7w7_nrw1xv40zs3jlfppl5/T/build8396541035725626353.tmp/DS18x20_SSD1306.cpp.bin Failed to open serial device. dfu-util: Invalid DFU suffix signature dfu-util: A valid DFU suffix will be required in a future dfu-util release!!! dfu-util 0.8 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2014 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to email@example.com Deducing device DFU version from functional descriptor length dfu-util: No DFU capable USB device available
- I also notice if I connect a CP2102 and select the new device in the Arduino Tools/Port menu (really just the board's RTS pin to STM32 RESET pin and GND seem needed), I am able to download without manually pressing reset. But then the board doesn't get reset properly after download:
Code: Select all
Download [=========================] 100% 29412 bytes Download done. state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present Done! Resetting USB to switch back to runtime mode dfu-util: error resetting after download
So, finally, the questions.
- Can I use the new bootloader 2.0 with only one USB connection (I'll take the native port or the CP2102)?
- In either case, what am I doing wrong to not handle the STM32 reset correctly (either missing the reset before the download, native USB), or resetting after the download (CP2102)?
- I think I read something about the USB driver not being able to be both a DFU driver and a "serial monitor" driver, like the original maple mini bootloader, though I'm pretty new to any/all details.
Any pointer would be appreciated!
Speaking of appreciation, again, this work is awesome. Coming back to hobby micro-controllers after a 15 year break (we had kids), I started to play with my old collection of PIC parts (don't laugh, but having fun with 16F87x parts). Then found the ESP8266, better times, loved the memory, missed the pins. Then broke down and started playing with Arduino, love the community support, back to little memory. I was about to jump to larger AVR parts, then read about the STM32/Arduino work, just brilliant. Memory and pins, woot. I'll probably throw some serially connected ESP-01s on them in AT mode, we'll see. I just got the mini yesterday, need to dig more...