Hi all,
I am trying to create on the LP-AM243x a small example, how I could have a fix-time interrupts at high frequency (each 200 us) and some FreeRTOS tasks running concurrently on the same core. For that purpose, I used the example empty_am243x-lp_r5fss0-0_freertos_ti-arm-clang. I constructed my example around these 2 functions:
- 1 IRQ from DMTIMER0 with trigger period of 200 us, which toggles GPIO1_35 output
- 1 FreeRTOS Task, which uses DebugP_log() to send a keep alive“ message regularly to my PC
/* timer irq function, called each 200 us with IRQ Prio 2 */ void timer_handler(void *args) { if(GPIO_pinRead(CONFIG_GPIO1_35_BASE_ADDR, CONFIG_GPIO1_35_PIN)) GPIO_pinWriteLow(CONFIG_GPIO1_35_BASE_ADDR, CONFIG_GPIO1_35_PIN); else GPIO_pinWriteHigh(CONFIG_GPIO1_35_BASE_ADDR, CONFIG_GPIO1_35_PIN); } /* empty_main() run with task prio 15 */ void empty_main(void *args) { /* Open drivers to open the UART driver for console */ Drivers_open(); Board_driversOpen(); while(1) { ClockP_usleep(1000e3); DebugP_log("Hello, I'm alive!\n"); } Board_driversClose(); Drivers_close(); }
Unfortunately, when I execute such an example, I get in the situation that my DMTIMER0 IRQ is "masked" while Debug_log() is sending the message (which can last more than 150 ms). My first thought was that, there is some interrupt masking within DebugP_log() but I cannot find any evidence in the SDK source code. Then, I guessed that there is a higher-prio interrupt running while DebugP_log() is running. So I tried to find something like that but I couldn't.
So my question is whether anyone knows why DebugP_log() is marking interrupts and how I could avoid that?
Thank your for your time and help.
Br, Nicolas