Search found 18 matches

by leonardo
Sat Aug 13, 2022 3:34 pm
Forum: General discussion
Topic: cant open the stm32f401cc serial terminal
Replies: 3
Views: 2598

Re: cant open the stm32f401cc serial terminal

GonzoG wrote: Sat Aug 13, 2022 10:40 am What are your board settings ??
As Serial might be USB Serial, not UART.
hi,thanks.my board setting is UART.
by leonardo
Sat Aug 13, 2022 9:49 am
Forum: General discussion
Topic: cant open the stm32f401cc serial terminal
Replies: 3
Views: 2598

cant open the stm32f401cc serial terminal

my board is stm32f401cc,and IDE is PlatformIO in vscode.
https://cbu01.alicdn.com/img/ibank/O1CN01JlN5Fc1NzcdIfAIg8_!!2891711641-0-cib.jpg
When I build and upload the code (via serial port), I open the monitor with serial port but can't see any data, thanks for your help


#include <Arduino.h ...
by leonardo
Tue Mar 16, 2021 12:47 am
Forum: General discussion
Topic: F401CCU6 Clock too slow
Replies: 5
Views: 3943

Re: F401CCU6 Clock too slow

fpiSTM wrote: Mon Mar 15, 2021 5:32 pm Your code get each led OFF 2 second and ON 1s.
Is this expected ?
yeah,A total of three three-color leds.
When the pin is low, the LED will on.
Therefore, when one LED is turned on, the other two LEDs need to be kept off
by leonardo
Tue Mar 16, 2021 12:34 am
Forum: General discussion
Topic: F401CCU6 Clock too slow
Replies: 5
Views: 3943

Re: F401CCU6 Clock too slow


the code looks ok, among the things you may like to check if you are running at the expected system clock speeds for your board. that would have something to do with the crystal frequency


Hey,The crystal is 12mhz.
I also tried to set board = blackpill_f401cc, but the flashing time became faster ...
by leonardo
Mon Mar 15, 2021 4:51 pm
Forum: General discussion
Topic: F401CCU6 Clock too slow
Replies: 5
Views: 3943

F401CCU6 Clock too slow

Hello everyone, I have a core board of F401CCU6. In the first test, I lighted three rgb leds.

The interval time is 1000ms,.
but after I upload the program, the interval between the two colors is about 2000ms.
This is much slower than in my code.

#include "Arduino.h"
int red = 0;
int green = 1 ...
by leonardo
Thu Mar 11, 2021 5:05 pm
Forum: General discussion
Topic: 'Timer2' was not declared in this scope
Replies: 8
Views: 8384

Re: 'Timer2' was not declared in this scope


in addition use the 'correct' (i.e. official) core.
https://github.com/stm32duino/Arduino_Core_STM32
it may be feasible to use 'libmaple', but that this isn't one of the pre-defined boards
https://github.com/rogerclarkmelbourne/Arduino_STM32/tree/master/STM32F4/variants
which means u'd need to ...
by leonardo
Thu Mar 11, 2021 5:02 pm
Forum: General discussion
Topic: 'Timer2' was not declared in this scope
Replies: 8
Views: 8384

Re: 'Timer2' was not declared in this scope


do note that the api specs for HardwareTimer in the official stm core is different from that in libmaple
https://github.com/stm32duino/wiki/wiki/HardwareTimer-library
did you try
void attachInterrupt(callback_function_t callback);
instead?
another thing is
#include <HardwareTimer.h>
right at ...
by leonardo
Thu Mar 11, 2021 8:47 am
Forum: General discussion
Topic: PlatformIO and Arduino IDE compilation results are different
Replies: 24
Views: 17375

Re: PlatformIO and Arduino IDE compilation results are different

I want to test the execution time of the function "digitalReadFast(digitalPinToPinName(pin))"
When I execute the print function, the loop time of the entire loop() is 1146 μs


#include "Arduino.h"

void setup() {
Serial.begin(9600);
}

void loop() {

unsigned int timecnt;
timecnt = micros ...
by leonardo
Thu Mar 11, 2021 6:03 am
Forum: General discussion
Topic: PlatformIO and Arduino IDE compilation results are different
Replies: 24
Views: 17375

Re: PlatformIO and Arduino IDE compilation results are different

Thanks for your reply, I tried the function you suggested,

Code: Select all

digitalReadFast(digitalPinToPinName(pin));
but the loop is still 1100 microseconds after using this function
by leonardo
Thu Mar 11, 2021 5:58 am
Forum: General discussion
Topic: PWM signal is inconsistent for STMF446RE - Help needed
Replies: 6
Views: 4624

Re: PWM signal is inconsistent for STMF446RE - Help needed

The software (simple FOC) and the development board (Nucleo F446RE) are fully compatible. Because I tried the same operation a few days ago, but the driver I used is DRV8302 15A

I think this is a pure hardware problem, please check whether your wiring and hardware are normal. It is recommended to ...

Go to advanced search