Setup of STM32F103CBT6 (Maple Mini) board

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
stevestrong
Posts: 736
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Setup of STM32F103CBT6 (Maple Mini) board

Postby stevestrong » Wed Jan 18, 2017 12:51 pm

Connect RX (maple mini) with TX (USB serial adapter), so basically exchange RX and TX.

And, btw, there is no BOOT2, (but) is BOOT0. And it is connected to the second button on the board, next to "reset" button.

So you could just connect BOOT1 (pin 2, or PB2) to GND and then:
- press (but) button and keep pressing
- press "reset" button
- release "reset" button
- wait 1 second
- release (but) button.
Now you can upload the bootloader.

Phil333
Posts: 17
Joined: Mon Jan 16, 2017 3:26 pm

Re: Setup of STM32F103CBT6 (Maple Mini) board

Postby Phil333 » Wed Jan 18, 2017 1:50 pm

The "BOOT2" was a typo and should have been BOOT0.
And on my Serial adapter the TX must be connected to TX.
Maybe the manufacturer thought it would be easyer for idiots to connect it right :D

The method with the button pressing you descriped has already been done like I said (from here), but this would just be the same like connectint the BOOT0 and BOOT1 like you said.

So I still cant upload the bootloader because I already have done this :(

stevestrong
Posts: 736
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Setup of STM32F103CBT6 (Maple Mini) board

Postby stevestrong » Wed Jan 18, 2017 1:57 pm

i can only give you same advise: exchange RX and TX.

Phil333
Posts: 17
Joined: Mon Jan 16, 2017 3:26 pm

Re: Setup of STM32F103CBT6 (Maple Mini) board

Postby Phil333 » Wed Jan 18, 2017 2:08 pm

Nope. That didnt work.

BUT if I click "Next" at the program directly after connecting the Adapter (with the Maple Mini) to the USB it works (TX to TX and RX to RX... I know this issue since my Arduino start :D ).

So another thing to pay attention is not waiting too long (maybe the bootloader locks itself or a similar problem after waiting too long?).

I am now at this screen and where should I go?
Should I "DISABLE WRITE PROTECTION" and then try the Arduino Bootloader v2.0 Sketch?
Or can/should I "Download" the maple_mini_boot20.bin file?
Attachments
05.PNG
05.PNG (32.81 KiB) Viewed 205 times

victor_pv
Posts: 957
Joined: Mon Apr 27, 2015 12:12 pm

Re: Setup of STM32F103CBT6 (Maple Mini) board

Postby victor_pv » Wed Jan 18, 2017 2:49 pm

Phil333 wrote:Nope. That didnt work.

BUT if I click "Next" at the program directly after connecting the Adapter (with the Maple Mini) to the USB it works (TX to TX and RX to RX... I know this issue since my Arduino start :D ).

So another thing to pay attention is not waiting too long (maybe the bootloader locks itself or a similar problem after waiting too long?).

I am now at this screen and where should I go?
Should I "DISABLE WRITE PROTECTION" and then try the Arduino Bootloader v2.0 Sketch?
Or can/should I "Download" the maple_mini_boot20.bin file?



You can select the option to modify option bytes and disable write protection.

I have updated clearOptionByte () in my previous post adding some steps I thought were not needed, but probably are.
If you can give it a shot once more, we can confirm if it works to add it permanently to the updater. As before you would have to run thru it twice.
If it doesn't work, then try clearing the write protection with the stm loader, and after that you should be able to upload the bin, or just reboot and run thru the updater sketch.

stevestrong
Posts: 736
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Setup of STM32F103CBT6 (Maple Mini) board

Postby stevestrong » Wed Jan 18, 2017 3:18 pm

You should reset the board after you connect the adapter to USB, otherwise the board get reset again when you plug it to PC.

I would just disable write protection, and then try the bootloader upload with stm32flash utility.

Phil333
Posts: 17
Joined: Mon Jan 16, 2017 3:26 pm

Re: Setup of STM32F103CBT6 (Maple Mini) board

Postby Phil333 » Wed Jan 18, 2017 5:02 pm

Sorry Victor, but after I made the steps I posted before with flash_loader_demo_v2.8.0.exe aka "Demonstrator GUI" the board looks dead on normal USB connection to the PC.

I will now trying to disable the write protection via the STM tool

victor_pv
Posts: 957
Joined: Mon Apr 27, 2015 12:12 pm

Re: Setup of STM32F103CBT6 (Maple Mini) board

Postby victor_pv » Wed Jan 18, 2017 5:51 pm

Phil333 wrote:Sorry Victor, but after I made the steps I posted before with flash_loader_demo_v2.8.0.exe aka "Demonstrator GUI" the board looks dead on normal USB connection to the PC.

I will now trying to disable the write protection via the STM tool


Phil, I edited my previous post to change one of the functions, did you try with that edited one?
Is it after that one that the board doesn't show up in USB even after disconnecting it?

EDIT: Did you select "Erase all" in the demonstrator GUI and clicked Next?
If so, then the bootloader is completely deleted. With the flash completely erased the board will not work on USB.
At this point you should first disable write protection, and then write the bootloader bin, both using the demonstrator GUI.

If you did erase, then you never got to run the version of the bootloader updater with the change function today, right?
I'm interested in knowing if it works, so we can incorporate those changes for people that receives a board with write protection set.

Phil333
Posts: 17
Joined: Mon Jan 16, 2017 3:26 pm

Re: Setup of STM32F103CBT6 (Maple Mini) board

Postby Phil333 » Thu Jan 19, 2017 6:18 am

I dont think that I have selected "Erase all" but I'm not sure because it behaved like I did.
I did click on "Edit otopn bytes" and did something there and after I was not successfull, I did it again with the "Disable write protection".

After that, the board was dead and I read that you updated the "locked bootloader sketch" - so unluckyly I could not test it and verify if its working.
But as I can see there is a ";" missing in line 342 so it would be "flashUnlock();"

The next thing I did was downloading the bootloader to the Maple Mini.
After that the LED was flashing again (screenshot in attachment).

As my PC didnt find it (Arduino IDE was not showing the COM port) I tried to flash the new updater sketch of you @victor_pv with no COM port selected but with bootloader 2.0 selected.
First it didnt work, then I selected the "Maple (Rev 3)" and it uploaded the sketch but still didnt show its COM port.
Then I selected again the "Maple Mini" and it stoped the upload at the point again, where I had to reset the board manually (reset button) to contuine the upload.
After this the COM port showed again and I could communicate with the board via the Serial Monitor.

I got the message "Congratulations. You have already updated to this version of the bootloader".

So it finally works :D


But to check your new sketch Viktor, I bought another Maple Mini from this seller and will tell you here (when it arrives - in about 3-4 weeks), if your sketch is working ;)

victor_pv
Posts: 957
Joined: Mon Apr 27, 2015 12:12 pm

Re: Setup of STM32F103CBT6 (Maple Mini) board

Postby victor_pv » Thu Jan 19, 2017 4:23 pm

Phil333 wrote:I dont think that I have selected "Erase all" but I'm not sure because it behaved like I did.
I did click on "Edit otopn bytes" and did something there and after I was not successfull, I did it again with the "Disable write protection".

After that, the board was dead and I read that you updated the "locked bootloader sketch" - so unluckyly I could not test it and verify if its working.
But as I can see there is a ";" missing in line 342 so it would be "flashUnlock();"

The next thing I did was downloading the bootloader to the Maple Mini.
After that the LED was flashing again (screenshot in attachment).

As my PC didnt find it (Arduino IDE was not showing the COM port) I tried to flash the new updater sketch of you @victor_pv with no COM port selected but with bootloader 2.0 selected.
First it didnt work, then I selected the "Maple (Rev 3)" and it uploaded the sketch but still didnt show its COM port.
Then I selected again the "Maple Mini" and it stoped the upload at the point again, where I had to reset the board manually (reset button) to contuine the upload.
After this the COM port showed again and I could communicate with the board via the Serial Monitor.

I got the message "Congratulations. You have already updated to this version of the bootloader".

So it finally works :D


But to check your new sketch Viktor, I bought another Maple Mini from this seller and will tell you here (when it arrives - in about 3-4 weeks), if your sketch is working ;)


Thanks Phil,I noticed the missing ; yesterday when I got home and tried to compile it. The code in the post should be corrected now.

I was going to test it in a board, but first I need to set the write protect, so I can verify it really clears it. I will post back here if I get to test it. If you get the new board in the meanwhile and get to test it before let us know.

I am glad at last you got it updated and the write protect off. I wonder why those sellers are setting write protect.

P.S. On how your board flash got cleared, is it possible that you selected the option to clear the "read protection"? doing so always wipes the flash.


Return to “Generic STM32F103”

Who is online

Users browsing this forum: MSNbot Media and 2 guests