Johannes in a Blue Pill
- bexander
- Posts: 866
- Joined: Tue Jun 16, 2020 6:00 pm
- Location: Gothenburg, Sweden
- Has thanked: 71 times
- Been thanked: 97 times
Re: Johannes in a Blue Pill
Ok, thanks, that explains alot!
I've just tested the hardware and it works.
Please, can you tell me how I upload first the bootloader and then the firmware, without erasing the bootloader, using stm32flash.
I guess -s option is needed but at what adress?
I've just tested the hardware and it works.
Please, can you tell me how I upload first the bootloader and then the firmware, without erasing the bootloader, using stm32flash.
I guess -s option is needed but at what adress?
- johu
- Site Admin
- Posts: 6644
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 348 times
- Been thanked: 1506 times
- Contact:
Re: Johannes in a Blue Pill
It's 11 years ago that I used stm32flash
Boot loader is on 0x08000000 and firmware at 0x08001000

Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- bexander
- Posts: 866
- Joined: Tue Jun 16, 2020 6:00 pm
- Location: Gothenburg, Sweden
- Has thanked: 71 times
- Been thanked: 97 times
Re: Johannes in a Blue Pill
Hm, I've made some progress, I think.
Did:
stm32flash -w stm32_loader.hex -b 115200 /dev/ttyUSB0
stm32flash -w stm32_sine.hex -e 0 -b 115200 /dev/ttyUSB0
Now the onboard green led blinks!
Update:
It works!
Thank you for all your help!!
Did:
stm32flash -w stm32_loader.hex -b 115200 /dev/ttyUSB0
stm32flash -w stm32_sine.hex -e 0 -b 115200 /dev/ttyUSB0
Now the onboard green led blinks!
Update:
It works!
Thank you for all your help!!
Re: Johannes in a Blue Pill
I have flashed my Bluepill with a USB Bootloader and when I flash it with stm32_sine.bin the green led stays on.
Where do I find the bootloader which supports stm32_sine firmware ??
Where do I find the bootloader which supports stm32_sine firmware ??
- bexander
- Posts: 866
- Joined: Tue Jun 16, 2020 6:00 pm
- Location: Gothenburg, Sweden
- Has thanked: 71 times
- Been thanked: 97 times
Re: Johannes in a Blue Pill
You can find it here:
https://github.com/jsphuebner/tumanako- ... r/releases
https://github.com/jsphuebner/tumanako- ... r/releases
Re: Johannes in a Blue Pill
Hello, I've got response from the bluepill.
My Current setup is Bluepill connected with USB to TTL Convertor, I used Putty on linux ubuntu for serial terminal.
I cant seem to start inverter in manual mode, typing start 2 on the terminal gives response as Inverter started, set fslipspnt 10 , set ampnom 10 and response is Set ok, and when I try to select the direction as set dir 1 it says value out of range, so I couldn't see any pwm pulses on any pwm pins.
Someone please tell me how to select the direction.
Thank you.
My Current setup is Bluepill connected with USB to TTL Convertor, I used Putty on linux ubuntu for serial terminal.
I cant seem to start inverter in manual mode, typing start 2 on the terminal gives response as Inverter started, set fslipspnt 10 , set ampnom 10 and response is Set ok, and when I try to select the direction as set dir 1 it says value out of range, so I couldn't see any pwm pulses on any pwm pins.
Someone please tell me how to select the direction.
Thank you.
-
- Posts: 656
- Joined: Sat Oct 05, 2019 6:50 pm
- Location: Northern California, USA
- Been thanked: 2 times
- Contact:
Re: Johannes in a Blue Pill
Pull the FWD pin to positive (3.3v).
Not sure which pin that is, check the schematics.
Not sure which pin that is, check the schematics.
- Bigpie
- Posts: 1759
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 81 times
- Been thanked: 419 times
Re: Johannes in a Blue Pill
Usart seems funky on my bluepills. Not sure why, if I use USB TTL the communication works, using Olimex mod wifi or demos d1 the communication doesn't work.
Anyone any idea why? These cheap bluepills seem very hit and miss.
Anyone any idea why? These cheap bluepills seem very hit and miss.
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
- bexander
- Posts: 866
- Joined: Tue Jun 16, 2020 6:00 pm
- Location: Gothenburg, Sweden
- Has thanked: 71 times
- Been thanked: 97 times
Re: Johannes in a Blue Pill
What do you mean with seial communication doesn't work with WiFi-module. Please be more specific, is there no transmissions, signals are there but can't receive anything etc.
Have you tried to reverse postion of Tx and Rx when using the WiFi-modules?
- Bigpie
- Posts: 1759
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 81 times
- Been thanked: 419 times
Re: Johannes in a Blue Pill
Oops, I get an error on index.html, cannot parse json.
If I look at request or hit 'http://x.x.x.x/cmd?cmd=json' I get
I've tried with the Olimex Mod-WiFi that I know works as I pulled it from my inverter.
If I look at request or hit 'http://x.x.x.x/cmd?cmd=json' I get
Code: Select all
j��)
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
Re: Johannes in a Blue Pill
Hello Isaac96, thanks for your reply.
FWD pin is pb7 on bluepill, I tied pb7 to 3.3v still got no pwm output when I enter start 2 on terminal, I get response as Inverter started but no PWM output.. And also when i type get dir it says 0.
FWD pin is pb7 on bluepill, I tied pb7 to 3.3v still got no pwm output when I enter start 2 on terminal, I get response as Inverter started but no PWM output.. And also when i type get dir it says 0.
- bexander
- Posts: 866
- Joined: Tue Jun 16, 2020 6:00 pm
- Location: Gothenburg, Sweden
- Has thanked: 71 times
- Been thanked: 97 times
Re: Johannes in a Blue Pill
You need to pull PB1 high as well. Also pull PB6 high for a short period to start the inverter.
Now if you have no errors you should get PWM.
You proably will have to use a potentiometer for current feedback and DC-bus feedback, otherwise overcurrent and udclow error is likely, and no PWM.
Now if you have no errors you should get PWM.
You proably will have to use a potentiometer for current feedback and DC-bus feedback, otherwise overcurrent and udclow error is likely, and no PWM.
Re: Johannes in a Blue Pill
I finally got PWM in manual mode.
Here's what I did To Start the Inverter in manual mode on bluepill, might help newbie like me.
Bluepill on breadboard with 5v, 3.3v and GND pulled out.
Pull B1 to 3.3v , B7 to 3.3v , and B6 to 3.3v momentarily. (B1_ MPROT/UAUX), (B6-Start),(B7-FWD).
Pull B8 to GND . (B8-REV)
Then issue "start 2" on terminal
Then type set "fslipspnt 1"
Then "ampnom 1"
This outputs a clean 50/50 duty cycle on all 6 PWM outputs.
Next I'm gonna try connecting the bluepill to the ESP8266, Wish me luck.
Here's what I did To Start the Inverter in manual mode on bluepill, might help newbie like me.
Bluepill on breadboard with 5v, 3.3v and GND pulled out.
Pull B1 to 3.3v , B7 to 3.3v , and B6 to 3.3v momentarily. (B1_ MPROT/UAUX), (B6-Start),(B7-FWD).
Pull B8 to GND . (B8-REV)
Then issue "start 2" on terminal
Then type set "fslipspnt 1"
Then "ampnom 1"
This outputs a clean 50/50 duty cycle on all 6 PWM outputs.
Next I'm gonna try connecting the bluepill to the ESP8266, Wish me luck.