Search found 82 matches

by fredbox
Wed Oct 21, 2020 8:51 pm
Forum: STM32F1 based boards
Topic: Serial over CDC data uploads but doesn't print any data
Replies: 10
Views: 163

Re: Serial over CDC data uploads but doesn't print any data

All of those connectors and no SWD pins? I have a commercial STM32F103VET6 board that I program using either a ST-Link dongle or a USB/Serial adapter connected to USART1. I never could get any bootloader stable enough to be useful. The ST-Link is the way to go. The code uploads in seconds and no foo...
by fredbox
Sat Sep 26, 2020 5:16 pm
Forum: Off topic
Topic: How to use STM32 boards with Arduino IDE and how fast ESP32 vs STM32 are they? (incl. surprise)
Replies: 7
Views: 559

Re: How to use STM32 boards with Arduino IDE and how fast ESP32 vs STM32 are they? (incl. surprise)

I saw this video when it appeared on my RSS feed last Sunday. It was a pretty good overview. Note that 8-bit uCs are not dead and are an excellent choice for some projects. True, I have a tube of ATTiny85s that are quite useful for small projects. It is surprising at the amount of code that will fit...
by fredbox
Sat Sep 26, 2020 5:05 pm
Forum: STM32F4 based boards
Topic: STM32F407VET6 Black board
Replies: 3
Views: 1319

Re: STM32F407VET6 Black board

You can find this board pretty much everywhere That's true but at the moment for the USA, Amazon is about $3 less than eBay. Aliexpress search has been broken for a while (slide to verify then error, with multiple browsers, with and without private browsing, with and without VPN running). Free ship...
by fredbox
Mon Aug 24, 2020 10:57 pm
Forum: General discussion
Topic: Arduino code compiles, will not work on Nucleo
Replies: 1
Views: 518

Re: Arduino code compiles, will not work on Nucleo

Assuming core 1.9.0 and a F103 board: HardwareSerial Serial1(PA10, PA9); HardwareSerial Serial2(PA3, PA2); HardwareSerial Serial3(PB11, PB10); void setup(){ Serial1.begin(9600); Serial2.begin(9600); Serial3.begin(9600); } In the options, select USART enabled, no generic serial. Names Serial1, 2, 3, ...
by fredbox
Tue Aug 04, 2020 7:27 pm
Forum: General discussion
Topic: Changing PWM duty cycle on BluePill produces wrong output
Replies: 9
Views: 1294

Re: Changing PWM duty cycle on BluePill produces wrong output

Try this:

Move MyTim->setPWM() to setup.

Inside loop, call
MyTim->setCaptureCompare(channel, dutycycle, PERCENT_COMPARE_FORMAT)

I would keep dutycycle in the range of 1 to 99, avoiding 0 and 100.
by fredbox
Sun Jul 26, 2020 8:13 pm
Forum: STM boards (Discovery, Eval, Nucleo, ...)
Topic: Softwareserial issue on stm32 f411re
Replies: 8
Views: 1811

Re: Softwareserial issue on stm32 f411re

Jumper PB0 to PB1. #include <SoftwareSerial.h> #define mySerial SerialUSB SoftwareSerial swSerial(PB1, PB0); void setup() { mySerial.begin(9600); swSerial.begin(9600); } void loop() { for (int i = 0; i < 6; ++i) { swSerial.print("hello\n"[i]); if (swSerial.available()) { char ch = swSerial.read(); m...
by fredbox
Sun Jul 26, 2020 6:34 pm
Forum: STM boards (Discovery, Eval, Nucleo, ...)
Topic: Softwareserial issue on stm32 f411re
Replies: 8
Views: 1811

Re: Softwareserial issue on stm32 f411re

I tested a GPS module connected to PB0/PB1 with SoftwareSerial on a 407 board. It is working fine, printing the NMEA messages from the module. #include <SoftwareSerial.h> #define mySerial SerialUSB SoftwareSerial gpsSerial(PB1,PB0); void setup() { mySerial.begin(9600); gpsSerial.begin(9600); } void ...
by fredbox
Sat Jul 25, 2020 5:15 pm
Forum: General discussion
Topic: Need some help with Bluetooth communication
Replies: 8
Views: 1507

Re: Need some help with Bluetooth communication

6. This is working fine and I am able to send text both ways. But the Serial.Write("Testing") still isn't being printed. Outputting anything to the USB or other serial ports during setup is usually a futile exercise. Roger's libmaple based core has been around for a few years and for a long time wa...
by fredbox
Fri Jul 24, 2020 11:46 pm
Forum: General discussion
Topic: Need some help with Bluetooth communication
Replies: 8
Views: 1507

Re: Need some help with Bluetooth communication

If using the STM32 official core, set both USART and USB to enabled with no generic Serial. Then define the serial port names so they won't move around on you. #define Serial SerialUSB // RX TX HardwareSerial Serial1(PA10, PA9); HardwareSerial Serial2(PA3, PA2); HardwareSerial Serial3(PB11, PB10); Y...
by fredbox
Wed Jul 15, 2020 11:23 pm
Forum: General discussion
Topic: Newbie stuck at first flash attempt (STM32F103)
Replies: 31
Views: 4658

Re: Newbie stuck at first flash attempt (STM32F103)

Since you are on Windows, see if you can get the Flasher-STM32 application working with a serial-usb connection.
See https://www.st.com/en/development-tools ... stm32.html for the program and https://youtu.be/wGbiT6IxGP0?t=257 for an example of using it.

Go to advanced search