Search found 22 matches

by Eldi4
Fri Dec 20, 2019 10:04 am
Forum: General discussion
Topic: Weird HardwareTimer behavior
Replies: 8
Views: 7056

Re: Weird HardwareTimer behavior

So i cleaned code on loop() and placed for(int x = 0; x<1000; x++){ asm("wfi"); } digitalWrite(PB5,!digitalRead(PB5)); on my loop(), and commented the //if(ledState) G2_HIGH(); else G2_LOW(); on handler_led(), what i notice is that, with timer paused, it blink at frequency of (aprroximatel...
by Eldi4
Fri Dec 20, 2019 8:46 am
Forum: General discussion
Topic: Weird HardwareTimer behavior
Replies: 8
Views: 7056

Weird HardwareTimer behavior

Hello there, I've had problem with HardwareTimer, it wont make me trigger interrupt for more than 500KHz, like it was capped. Here is my code #define G2_LOW() GPIOB->regs->ODR &= ~(1 << 5) #define G2_HIGH() GPIOB->regs->ODR |= (1 << 5) unsigned long ms1 = 0; unsigned long ms2 = 0; unsigned long ...

Go to advanced search