Page 4 of 4

Re: Johannes in a Blue Pill

Posted: Wed Jun 17, 2020 6:56 pm
by bexander
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?

Re: Johannes in a Blue Pill

Posted: Wed Jun 17, 2020 7:38 pm
by johu
It's 11 years ago that I used stm32flash :) Boot loader is on 0x08000000 and firmware at 0x08001000

Re: Johannes in a Blue Pill

Posted: Wed Jun 17, 2020 7:40 pm
by bexander
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!!

Re: Johannes in a Blue Pill

Posted: Thu Oct 29, 2020 6:52 am
by aravinth
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 ??

Re: Johannes in a Blue Pill

Posted: Thu Oct 29, 2020 7:11 am
by bexander

Re: Johannes in a Blue Pill

Posted: Sat Oct 31, 2020 1:28 pm
by aravinth
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.

Re: Johannes in a Blue Pill

Posted: Sat Oct 31, 2020 4:32 pm
by Isaac96
Pull the FWD pin to positive (3.3v).
Not sure which pin that is, check the schematics.

Re: Johannes in a Blue Pill

Posted: Sat Oct 31, 2020 4:38 pm
by Bigpie
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.

Re: Johannes in a Blue Pill

Posted: Sat Oct 31, 2020 5:05 pm
by bexander
Bigpie wrote: Sat Oct 31, 2020 4:38 pm 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.
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?

Re: Johannes in a Blue Pill

Posted: Sat Oct 31, 2020 6:01 pm
by Bigpie
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

Code: Select all

j��)
I've tried with the Olimex Mod-WiFi that I know works as I pulled it from my inverter.

Re: Johannes in a Blue Pill

Posted: Mon Nov 02, 2020 7:43 am
by aravinth
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.

Re: Johannes in a Blue Pill

Posted: Mon Nov 02, 2020 8:35 am
by bexander
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.

Re: Johannes in a Blue Pill

Posted: Tue Nov 03, 2020 11:39 am
by aravinth
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.