Search found 94 matches

by mlundin
Thu Mar 11, 2021 5:23 pm
Forum: General discussion
Topic: 'Timer2' was not declared in this scope
Replies: 8
Views: 5640

Re: 'Timer2' was not declared in this scope

Dont try to modify the code written for another core. Take a look at the Timer documentation for the stm32duino core
https://github.com/stm32duino/wiki/wiki ... y#Examples
The InputCapture.ino example should help with configuring timers and attaching an input capture interrupt.
by mlundin
Tue Mar 09, 2021 8:01 pm
Forum: IDE's
Topic: Arduino IDE 2.0
Replies: 18
Views: 12859

Re: Arduino IDE 2.0

I downloaded and tried to code some encoder stuff onto a Nucleo L476 board. Starting from a Arduino 1.8 installation with stm32duino I downloaded IDE 2.0 and started the new IDE. After adding the the STM32Duino additional board manager path https://github.com/stm32duino/BoardManagerFiles/raw/master/...
by mlundin
Sat Mar 06, 2021 2:46 pm
Forum: General discussion
Topic: Problem with multiple timer input capture
Replies: 3
Views: 3222

Re: Problem with multiple timer input capture

Since both inputs are on the same timer, TIM2, there should be only one HardwareTimer object, and both channels should be configured for this timer.
by mlundin
Sat Mar 06, 2021 8:02 am
Forum: General discussion
Topic: Problem with STM32F103C8 and SPI OLED with U8g2 lib
Replies: 3
Views: 2788

Re: Problem with STM32F103C8 and SPI OLED with U8g2 lib

How is the display connected to the SM32, what pins ?
What core are you using, what board and variant selection ?
by mlundin
Mon Mar 01, 2021 5:11 pm
Forum: General discussion
Topic: Cannot get any HW serial interface working on STM32F407VG Discovery
Replies: 3
Views: 2381

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

Try pins PA2 and PA3, or pD8 and PD9, it looks like PA10 and PA9 are connected to the debug ST-Link
by mlundin
Sun Feb 28, 2021 3:12 pm
Forum: General discussion
Topic: Error when running STM32_Programmer_CLI
Replies: 2
Views: 3881

Re: Error when running STM32_Programmer_CLI

Just as the error message states: The FTDI adapter is not a ( ST-Link ) debug probe. The FTDI is opened as a serial port on the Linux side and also when connected to the STM32F103C, I assume it is connected to RX and TX pins. So for STM32_Programmer_CLI you must give the serial port on Arch Linux th...
by mlundin
Thu Feb 25, 2021 9:48 am
Forum: General discussion
Topic: Port manipulation STM32F411
Replies: 6
Views: 4772

Re: Port manipulation STM32F411

The analogRead() function is very generic, and it intializes and deinitializes the HAL ADC layer for every call. A quick test on a F407 Discovery board gave around 60uS per call or 18kHz sampling frequency. If you do your own calls to the HAL layer, this can be improved a lot. I tested the code from...
by mlundin
Tue Feb 23, 2021 10:18 am
Forum: General discussion
Topic: Port manipulation STM32F411
Replies: 6
Views: 4772

Re: Port manipulation STM32F411

You can use PWM outputs for precisely timed sequences of pulses, or make it yourself using the timer library, its really convenient but the interrupt overhead in HAL for attach'd interrupts is a bit long, depends on your speed and timing requirements. Another pattern for timed events is something li...
by mlundin
Mon Feb 15, 2021 7:04 pm
Forum: General discussion
Topic: STM32 - detachInterrupt and deepSleep
Replies: 8
Views: 10268

Re: STM32 - detachInterrupt and deepSleep

Looking at the source code in the Low Power library: https://github.com/stm32duino/STM32LowPower void STM32LowPower::attachInterruptWakeup(uint32_t pin, voidFuncPtrVoid callback, uint32_t mode, LP_Mode LowPowerMode) this function does two things, it attaches the pin interrupt and it enables the pin ...
by mlundin
Tue Jan 05, 2021 4:24 pm
Forum: General discussion
Topic: Compensate for LSE error
Replies: 12
Views: 7835

Re: Compensate for LSE error

I dont have the hardware to test but if the LSE runs correctly when not sleeping then my wild guess would be that the core somehow switches to LSI when sleeping.

Go to advanced search