[SOLVED]Hardwaretimer do not work on Maple Mini

Post here all questions related to STM32 core if you can't find a relevant section!
Post Reply
Ralf9
Posts: 33
Joined: Sat Jan 11, 2020 7:21 pm
Answers: 1
Location: Germany, BaWü

[SOLVED]Hardwaretimer do not work on Maple Mini

Post by Ralf9 »

Hi,

I have test the code in this example:
https://github.com/stm32duino/STM32Exam ... llback.ino
The LED do not blink
Last edited by Ralf9 on Sun Jan 26, 2020 8:23 am, edited 1 time in total.
fpiSTM
Posts: 1838
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 102
Location: Le Mans
Contact:

Re: Hardwaretimer do not work on Maple Mini

Post by fpiSTM »

You use the master of the library which has this change:
https://github.com/stm32duino/STM32Exam ... 0a3352f716

Use the last release then it should work with the last official release.
Or use the core repository which has the linked change.
Ralf9
Posts: 33
Joined: Sat Jan 11, 2020 7:21 pm
Answers: 1
Location: Germany, BaWü

Re: Hardwaretimer do not work on Maple Mini

Post by Ralf9 »

Thank you, when I insert this

Code: Select all

MyTim->setMode(2, TIMER_OUTPUT_COMPARE);
before

Code: Select all

MyTim->setOverflow(31*1000, MICROSEC_FORMAT);
then it works.


Is this needed

Code: Select all

#if defined(TIM1)
  TIM_TypeDef *Instance = TIM1;
#else
 TIM_TypeDef *Instance = TIM2;
#endif
Or can I on the Maple Mini always use

Code: Select all

TIM_TypeDef *Instance = TIM1;
and setMode with channel 2?
Post Reply

Return to “General discussion”