Search found 18 matches

by leonardo
Thu Mar 11, 2021 5:25 am
Forum: General discussion
Topic: PlatformIO and Arduino IDE compilation results are different
Replies: 24
Views: 17895

Re: PlatformIO and Arduino IDE compilation results are different

Oh sorry, I did not notice the error in this line of code,

Code: Select all

  timecnt = micros();                                        
because the calculation result is still correct

I have another RC receiver, so I want to use these codes to read pwm waves. But I don’t want too much delay
by leonardo
Thu Mar 11, 2021 4:43 am
Forum: General discussion
Topic: PlatformIO and Arduino IDE compilation results are different
Replies: 24
Views: 17895

Re: PlatformIO and Arduino IDE compilation results are different

Oh sorry, I did not notice the error in this line of code,

Code: Select all

  timecnt = micros();                                        
because the calculation result is still correct

I have another RC receiver, so I want to use these codes to read pwm waves. But I don’t want too much delay
by leonardo
Thu Mar 11, 2021 12:43 am
Forum: General discussion
Topic: PlatformIO and Arduino IDE compilation results are different
Replies: 24
Views: 17895

Re: PlatformIO and Arduino IDE compilation results are different

Hi ozcar.
I use "timecnt" to calculate the execution time of the interrupt. Because I found that the execution time of this interrupt on Nucleo F446RE is slower than the general STM32F103C series. I want to know why this happens
by leonardo
Wed Mar 10, 2021 1:35 pm
Forum: General discussion
Topic: PlatformIO and Arduino IDE compilation results are different
Replies: 24
Views: 17895

Re: PlatformIO and Arduino IDE compilation results are different

hey guys,For further verification, I purchased a Generic STM32F103C series and ST Nucleo F446RE respectively.

Yes, the compilation and upload are successful, and the print data is also normal.
But I found that the time taken by the interrupt in the two cases is not the same

Why is the execution ...
by leonardo
Sun Mar 07, 2021 4:15 pm
Forum: General discussion
Topic: 'Timer2' was not declared in this scope
Replies: 8
Views: 8798

'Timer2' was not declared in this scope

I encountered this problem when compiling this code,
'Timer2' was not declared in this scope.
I tried for a day and still not resolved. :cry:

PLATFORM: ST STM32 (8.0.0)> ST Nucleo F446RE
HARDWARE: STM32F446RET6 180MHz, 128KB RAM, 512KB Flash


#include "Arduino.h"
int32_t channel_1_start ...
by leonardo
Sun Mar 07, 2021 10:42 am
Forum: General discussion
Topic: PlatformIO and Arduino IDE compilation results are different
Replies: 24
Views: 17895

Re: PlatformIO and Arduino IDE compilation results are different

GonzoG wrote: Sun Mar 07, 2021 10:13 am Don't know which core you use (Roger Clark's or STM) but GIOx_BASE is not a pointer in any.
In Roger's core you need to use GPIOx->regs->IDR
in STM core: GPIOx->IDR
OK,Thank you very much!
by leonardo
Sun Mar 07, 2021 12:33 am
Forum: General discussion
Topic: PlatformIO and Arduino IDE compilation results are different
Replies: 24
Views: 17895

Re: PlatformIO and Arduino IDE compilation results are different


Put declaration of receiver_ch1 before setup().


Yeah,you are right! Now there is only one error left.

Processing genericSTM32F103ZE (platform: ststm32; board: genericSTM32F103ZE; framework: arduino ...
by leonardo
Sat Mar 06, 2021 3:03 pm
Forum: General discussion
Topic: PlatformIO and Arduino IDE compilation results are different
Replies: 24
Views: 17895

PlatformIO and Arduino IDE compilation results are different

Hello everyone, when I compile this code under arduino IDE, it can compile successfully.


#include "Arduino.h"
uint32_t now, receiver_input1, receiver_input1_previous;

void setup() {
Serial.begin(57600); //Start serial port at 57600bps
attachInterrupt(PB10, receiver_ch1, CHANGE); //Connect ...

Go to advanced search