2022-03-21 02:28 AM
My plan is to create a new task for my code, where I generate a hardware timer for PWM output with an interrupt. And on every interrupt trigger I want to execute some code.
The problem is my GUI freezes when the timer starts, and the maximum frequency I can get is around 400KHz, while my target frequency should be at least 10MHz to get it to work and it's best if it can handle a 20MHz~100MHz frequency. It's used for an external ADC IC, and on every rising clock edge I want to read 8 GPIO pins to get an 8-bit ADC value.
I feel like RTOS should be able to handle this signal, and I've read some blogs on using hardware timers with FreeRTOS vs using 'a ISR from FreeRTOS'. But that quickly ended up a dead end or I had to dive deep in FreeRTOS.
Does anyone know how I can get my timer PWM generation to work, allowing me to execute some code on every pulse or period without a chance to miss these, while running a FreeRTOS project? Or should I drop FreeRTOS and run TouchGFX and my stuff without OS?
2022-04-05 03:07 AM