Search found 125 matches

by fredbox
Mon Mar 15, 2021 5:42 pm
Forum: General discussion
Topic: F401CCU6 Clock too slow
Replies: 5
Views: 2707

Re: F401CCU6 Clock too slow

Test delay() speed by blinking a single LED.
Also, keep in mind that your LED is on when the pin is low.

Chances are that your code is doing exactly what you have told it to do and there is no issue with timing.
by fredbox
Sun Mar 14, 2021 2:29 am
Forum: General discussion
Topic: analogRead slow with ST libraries
Replies: 7
Views: 5329

Re: analogRead slow with ST libraries

Add your .ino to a zip file and you should be able to attach it. STM32 Cores 1.9.0 is the "official" core. The other is libmaple that someone created to make it easier to install. Long before there was an official core, this forum was stm32duino and Roger's libmaple core was the only Ardui...
by fredbox
Mon Mar 01, 2021 3:56 pm
Forum: General discussion
Topic: Cannot get any HW serial interface working on STM32F407VG Discovery
Replies: 3
Views: 2366

Re: Cannot get any HW serial interface working on STM32F407VG Discovery

Snippets from one of my projects on a STM32F407 black board: #define mySerial SerialUSB HardwareSerial gpsSerial(PA10, PA9); in setup() mySerial.begin(9600); gpsSerial.begin(9600); in loop() if (gpsSerial.available()) { char ch = gpsSerial.read(); mySerial.print(ch); } Options - USB: CDC enabled, no...
by fredbox
Tue Feb 23, 2021 3:06 am
Forum: General discussion
Topic: Port manipulation STM32F411
Replies: 6
Views: 4145

Re: Port manipulation STM32F411

Before debugging direct port manipulation, try digitalWriteFast(). See https://www.stm32duino.com/viewtopic.php?p=477#p477 . Note that digitalWriteFast uses different arguments (PA_1 instead of PA1) for operation. There are macros that do the conversion between pinNames and pinNumbers. Search the fo...
by fredbox
Fri Feb 12, 2021 10:36 pm
Forum: Custom design boards
Topic: No STM32 Target Found
Replies: 2
Views: 6998

Re: No STM32 Target Found

A quick DDG search finds http://ims-kharkov.narod.ru/stm32pcb.htm which has several links to schematics. The page is in Russian, but appears to contain one schematic that matches your processor.
by fredbox
Sun Feb 07, 2021 2:53 am
Forum: General discussion
Topic: Buttons problem
Replies: 10
Views: 5554

Re: Buttons problem

Coding a working hierarchical menu on a microprocessor is a good coding exercise. There are many ways to get there. The first thing I would do is to create a flowchart and map out each menu with exactly what you want to happen when buttons are pressed. I wrote my first menu system for an 8051 about ...
by fredbox
Tue Feb 02, 2021 12:24 am
Forum: General discussion
Topic: Bluepill external interrupts
Replies: 3
Views: 2708

Re: Bluepill external interrupts

You probably want to debounce in software rather than hardware. Tactile switches are very noisy and hard to use with an interrupt pin. Add this code after loop: //poll every millisecond void HAL_SYSTICK_Callback() { // call switch debounce code from here } If you have a good software debounce, you d...
by fredbox
Sun Jan 24, 2021 8:45 pm
Forum: Ideas & suggestions
Topic: LCD
Replies: 25
Views: 94087

Re: LCD

Ray's advice to store local copies of the libraries with each project is sound. I've had a couple of projects unexpectedly fail to compile after a 3rd party library was automatically updated. Now I always copy any needed libraries into the project folder.
by fredbox
Sat Jan 16, 2021 8:18 pm
Forum: STM32F4 based boards
Topic: New STM32F401CCU6 Black Pill
Replies: 7
Views: 9487

Re: New STM32F401CCU6 Black Pill

No need for additional bootloaders.

Press both buttons, release reset, release boot 0. That should put you in dfu mode.
by fredbox
Fri Jan 15, 2021 6:25 pm
Forum: General discussion
Topic: Factory Resetting my Blue Pill
Replies: 4
Views: 5610

Re: Factory Resetting my Blue Pill

For new users, the recommended path is to use the official STM core. https://github.com/stm32duino/Arduino_Core_STM32 If you installed the Roger/Maple bootloader, your SWD pins used by ST-Link are likely disabled. Try to upload a blink sketch using the ST-Link. Press reset, click upload, release res...

Go to advanced search