HardwareTimer(TIM1) is now broken

Post Reply
john k2ox
Posts: 4
Joined: Sun May 03, 2020 7:15 pm

HardwareTimer(TIM1) is now broken

Post by john k2ox »

Hello,

I just installed Platformio on a new PC. An app that builds and runs fine on the old PC builds fine builds fine on the new PC but no longer executes correctly.

The timer ISR has stopped firing.

The flash is also about 3800 bytes smaller. See code below.

To verify I updated the old PC to the new platform and the code no longer works on the old PC either.

Tks,
John


Orig platform(works):
- framework-arduinoststm32 3.10700.191028 (1.7.0)
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)


New updated platform(broken):
- framework-arduinoststm32 4.10800.200207 (1.8.0)
- tool-dfuutil 1.9.200310
- tool-openocd 2.1000.190707 (10.0)
- tool-stm32duino 1.0.2
- toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)

Code Snippet:
HardwareTimer *myTim = new HardwareTimer(TIM1); // 1/27/20
myTim->setOverflow(10000, MICROSEC_FORMAT); // 1,000,000 = 1sec, 10,000 = 10mS
myTim->attachInterrupt(timerISR);
myTim->resume();
by stas2z » Tue May 12, 2020 5:18 am
Add

Code: Select all

MyTim->setMode(1, TIMER_OUTPUT_COMPARE); 
before resume

Its a some kind of bug of 1.8.0 and will be fixed in 1.9.0
Go to full post
stas2z
Posts: 131
Joined: Mon Feb 24, 2020 8:17 pm
Answers: 8

Re: HardwareTimer(TIM1) is now broken

Post by stas2z »

Add

Code: Select all

MyTim->setMode(1, TIMER_OUTPUT_COMPARE); 
before resume

Its a some kind of bug of 1.8.0 and will be fixed in 1.9.0
john k2ox
Posts: 4
Joined: Sun May 03, 2020 7:15 pm

Re: HardwareTimer(TIM1) is now broken

Post by john k2ox »

Thank you @stas2z, that fixed it.
Post Reply

Return to “PR's bugs and enhancements”