Spark Logic

Maple mini clone first program

STM32F103RBT6 LQFP64 Pinout
ATmega328 TQFP-32 Pinout
STM32F103C8T6 LQFP48 Pinout

Hi.

First sorry if my question is stupid.

I’m newbie.

I want to move from arduino to stm

I have the same board described here by Roger:
http://www.rogerclark.net/stm32f103-and … 1-5-x-ide/

Environment
Windows 10
Arduino IDE 1.7.7.

I can not upload simple program from this link

I tried to prepare my environment cccording to Rogers’s description.

I see some diferences and I have small questions

Using Arduino IDE 1.7.7 I dont have “STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog to FLASH – no bootloadrer” board.

I used “Generic STM32F103RBSTM32F103RBMicrocontrollers and processors…duino IDE 1.7.7 I dont have “STM32 to FLASH – no bootloadrer” board. I used “Generic STM32F103RB ”. In this tutorial there is step 12: “On the Maple mini, press and hold the “Butt…View in hardware catalog ”.

In this tutorial there is step 12:
“On the Maple MiniMaple MiniDevelopment and computing boards…8MHz petertumler Thu Sep 24, 2015 10:58 am Hi, I’m trying to underclock a STM32F103 ( Maple Mini ) to 48MHz (for energy efficiency reasons). According to the datasheet .. The full…View in hardware catalog , press and hold the “Button” then tap and release “reset”. This puts the board into serial flash upload mode”

My question is :
Where id “Button” on this board ?

I just pressed reset and click upload my program.

Unfortunately I got error:

Failed to init device.
stm32flash 0.4

http://stm32flash.googlecode.com/

Using Parser : Raw BINARY
Interface serial_w32: 230400 8E1

Any hel please ?

Replies20

Fri Oct 02, 2015 10:10 am

When you plug in the board, how does it show up in windows device manager?

You may need to plug in a serial to USB cable to program the board if it does not have a bootloader installed by the supplier. Some of the board I have received simply had a blink example pre-programmed, others had the MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog bootloader pre-loaded.

If you need to go down the line of using an external programmer to get a boot loader flashed to the board, I would suggest you pick up one of the cheap ST-Link clones on ebay, thiese will allow you to program the thing even if like me, you have a habit of completely scrambling its brains. These only cost a couple of bucks, and they are really useful. Armed with one of the ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog V2 clones, you can then flash a bootloader on to your board, then put the ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog to one side, and program using the bootloader. If the worst happens and you appear to have bricked the board, grab the ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog , erase the flash with it, re-install the bootloader and start again.

One other point, STFlash states “Open source cross platform flash program for the STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog ARM microcontrollers using the built-in ST serial bootloader over UART or I2C” in other words, you need a usb to serial adapter to use stflash, and you need to connect the correct pins *and* set the correct BOOT jumpers for this to work.

Fri Oct 02, 2015 10:16 am

This is to so called “Blue PillBlue PillDevelopment and computing boards…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…View in hardware catalog ” board. It doesn’t have a bootloader on board.
So, as Andy said, you need
a) a Serial USB Converter or
b) a ST Link 2 dongle
(both are for less than 3-4 USD on aliexpress)
With this devices you can upload a bootloader to your board and then you can upload sketches directly via USB.
If you own an Arduino UnoArduino UnoDevelopment and computing boards…ime debugging. konczakp Mon Jul 18, 2016 12:18 pm OK, so I took working example from Arduino UNO . I’ve cut off everything from library that I don’t need and from rest I have crea…View in hardware catalog you can hijack it as serial converter. (Just must get the DIP-ATmega328ATmega328Microcontrollers and processors…al port without resetting, the 16u2 send a pulse of about 4 us to the RX port of the Atmega328 . This pulse can be interpreted as a characher that depends on baudrate A 256000 you…View in hardware catalog out first then you can use “0” as RX and “1” as TX)

Fri Oct 02, 2015 10:21 am

To clarify, we are talking about two different bootloaders. The ST32F10XX has a built in Serial bootloader. This is always available, but requires a serial interface on your PC (the USB to serial converter I described).

There is also an optional USB bootloader, but this is written to the board using the serial boot loader, or using the JTAG /ST-LINKST-LINKModules, instruments and finished devices…ot add the serial usb device… suspect flashing failed…. Do I need to debrick it with st-link ? (which I don’t have lol) BennehBoy Mon Jan 23, 2017 8:11 pm NM managed to rescue it…View in hardware catalog method.

If you search this forum, and Rogers Wiki, you will find all of the details there.

Fri Oct 02, 2015 12:09 pm

Thank you all for reply.

Now I can upload using serial.

I will try do upload bootloader and use USB .

Fri Oct 02, 2015 2:12 pm

Hi I have another question.

I’ve downloaded MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog _mini_boot20.bin from https://github.com/rogerclarkmelbourne/ … 1/binaries

Then I’ve executed :

serial_upload.bat COM3 {upload.altID} {upload.usbID} D:\temp\MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog _mini_boot20.bin

After that I’ve received error below:

http://stm32flash.googlecode.com/

Using Parser : Raw BINARY
Interface serial_w32: 230400 8E1
Version : 0x22
Option 1 : 0x00
Option 2 : 0x00
– RAM : 20KiB (512b reserved by bootloader)
– Flash : 128KiB (sector size: 4×1024)
– Option RAM : 16b
– System RAM : 2KiB
Write to memory
Erasing memory
Wrote address 0x08007200 (99.70%) Error: WRITE address and length must be 4 byte aligned
Failed to write memory at address 0x08007200

Fri Oct 02, 2015 3:42 pm

If I am not wrong and you have a board that it is not a MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog you can’t use MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog bootloader. You must use the generic one but I don’t know wich one.

Fri Oct 02, 2015 3:51 pm

The board in question is the “Blue PillBlue PillDevelopment and computing boards…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…View in hardware catalog ” STM32F103C8T6STM32F103C8T6Microcontrollers and processors…e Sep 27, 2016 10:28 pm I know this is an old topic, but… I’m using blue pill board ( STM32F103C8T6 , version 3). With the current (modified) Adafruit library 0.96″ OLED display w…View in hardware catalog – it has the LED on PC13 – so you should be able to use the pre-built“generic_boot20_pc13.bin”bootloader. See the Wiki for more details.

Fri Oct 02, 2015 4:01 pm

With generic_boot20_pc13.bin I’ve got the same error:

Wrote address 0x08007200 (99.64%) Error: WRITE address and length must be 4 byte aligned
Failed to write memory at address 0x08007200

Fri Oct 02, 2015 4:19 pm

What version of stm32flash are you using?

Fri Oct 02, 2015 4:23 pm

Additional info:

After fourth download I could install bootloader.
Now dfu works fine.

Do you know why with first 3 attempts I couldn’t do it. Why I had to redownload the file ?

I have latest version of Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master.

Fri Oct 02, 2015 7:38 pm

Is there a rationale for struggling with a DIY bootloader for the STM32F’s instead of using one of the STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog ’s that has one built into ROM?

Fri Oct 02, 2015 8:02 pm

Is there a rationale for struggling with a DIY bootloader for the STM32F’s instead of using one of the STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog ’s that has one built into ROM?

The F103 doesnt have a USB bootloader it only had a hardware serial bootloader, which means that you need external hardware to flash the F103 using its own internal bootloader,
where as with the USB bootloader code you can flash via DFU and USB and dont need any additional hardware

Sat Oct 03, 2015 3:28 pm

stevech wrote:Is there a rationale for struggling with a DIY bootloader for the STM32F’s instead of using one of the STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog ’s that has one built into ROM?

Sat Oct 03, 2015 4:30 pm

marcin.kasinski wrote:Do you know why with first 3 attempts I couldn’t do it. Why I had to redownload the file ?

Mon Oct 05, 2015 8:53 am

Hello.

I uploaded bootloader to my second Blue PillBlue PillDevelopment and computing boards…as become my new favorite board. I am calling it “blue pad” and it is kind of super “ blue pill ”. Pito Thu Jul 27, 2017 8:53 pm [victor_pv – Thu Jul 27, 2017 3:58 pm] – Just for…View in hardware catalog

Now I have problem with serial port.

On first device after every uploading using dfu or after reconnecting “MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog serial port” device disappears from device manager and I can not upload another program. To solve it I have to install drivers again.

On second device “MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog serial port” disappeared permanently. Installing drivers doesn’t help here.

Is it deviceid problem or something?
Am I doing something wrong ?

Mon Oct 05, 2015 9:34 am

marcin.kasinski wrote:On first device after every uploading using dfu or after reconnecting “MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog serial port” device disappears from device manager and I can not upload another program. To solve it I have to install drivers again.
On second device “MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog serial port” disappeared permanently. Installing drivers doesn’t help here.

Is it deviceid problem or something?
Am I doing something wrong ?

Mon Oct 05, 2015 10:51 am

Thank you for your reply.

I’m using official Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog .
I’ve installed bootloader on both devices.

I can see that on both devices I can upload program using DFU.

Problem is that I would like to see UART messages generated by my code . I need com port to connect to.

Like I said I can connect to one device after reinstalling drivers. I can see com port using windows device management. every upload and reconnecting deletes com port from windows deveice management.
I can upload program but I can not connect to my second device. There is no com port in my windows device management.

Upload outut:

Opening USB Device 0x1eaf:0x0003…
Found Runtime: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=2, name=”STM32duino bootloader v1.0 Upload to Flash 0x8002000″
Setting Configuration 1…
Claiming USB DFU Interface…
Setting Alternate Setting …
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing

Transfer Size = 0x0400
bytes_per_hash=258

Starting download: [##################################################] finished!
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
error resetting after download: usb_reset: could not reset device, win error: Nie można odnaleźć określonego pliku -> can not find file.
Done!

Resetting USB to switch back to runtime mode

Post a reply

Optional · up to 10 MiB