This is a portion of my product code, but i got some problem. When an external interrupt occurs i want to start a timer and increment one variable and when timer reaches 30 seconds i want to display the variable via UART. I will provide my code.when ...
Hi, I got a small problem while configuring timers in NUCLEO-F072RB board. I want to configure one timer for 1ms and another for 1sec, Could you please explain me how to set the prescaler and period(ARR) values of both the timers. My HCLK is 48MHz.
Hi,Thank you for your reply. The problem was sorted.You only need to set a flag, then it will work properly. Here is my updated code: void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin){ex_interrupt = 1;flag = 1;}if(ex_interrupt == 1){ex_interrupt = 0;if...
Thank you all for the replies.I figured out my problem. Except for the more recent dual core MCUs, most STM32 are limited to running only one thing at a time, so i am trying to use FreeRTOS or similar to have the system switch between tasks as needed...
Again that 1ms is not working correctly but i tried for 100ms and 500ms it is working properly, but when i am using 2 timers together and when running the code i am getting an hardfault error handler.