Hello, I am trying to set a Calback function for Timer0 to sample ADC with 9Kh frequency. I followed the example of the use of the PWM but I just dont see it working.
What are the things to check to be sure I am setting every thing right here ?
Device:
Yes I am doing that. But I guess something is wrong is happening. When I call the timer0_test() function, nothing is working (I am toggling the GPIO_0_pin3) in th callback function.
and if i just make this test in the main loop:
int i = 10;
while(1){
while(i) {
GPIO_SetActive(GPIO_PORT_0, GPIO_PIN_3);
GPIO_SetInactive(GPIO_PORT_0, GPIO_PIN_3);
i--;
}
timer0_test();
}
The PIN toggle for only for the first run of the main loop. which make me conclude that the timer0_test is blocking the loop and maybe watchdog reset is happening.