This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM243X: Priorities of interrupts

Part Number: MCU-PLUS-SDK-AM243X

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

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* 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");
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

  • Hi Nicolas,

    The issue is probably the "Enable CCS Log" in Debug_Log. Please open example.syscfg and uncheck "Enable CCS Log" in Debug_Log. Rebuild the project.

    The CCS console log is very intrusive. It will disable all interrupts.

    Best regards,

    Ming

  • Hi Ming,

    thank you for your answer. It was indeed that my issue. Is there any public document which explains how this "CCS Log" operates? I couldn't trace the functionality through the source code.

    Br, Nicolas

  • Hi Nicolas,

    It should be in the CCS user guide.

    The DEBUG_Log has three options: CCS console, UART and memory log. For easy of use, CCS and UART are recommended. For real time control, the UART and the memory log recommended.

    Best regards,

    Ming

  • Hi Ming,

    thanks for you feedback. It's very appreciated.

    Best Regards, Nicolas