PSOC6 CE218136: can't debug with uart

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Leo_liu1
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

Hi sir,

I'm using psoc creator 4.2 run demo: CE218136_EINK_CapSense_RTOS ,everything is ok if uart component is disable.

When i enable uart component and #define UART_DEBUG_ENABLE    (true),code will loop in vTaskStartScheduler() ,

how can i makesure this issue,please help to check,thanks.

Best  Regards,

Leo

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi LeoLiu_3670906​,

There is a small issue in the code example. InitDebugPrintf() function is not called from the application that initializes the task Task_Debug and queue debugMessageQ. Add the following line of code in main() and the code worked fine.

main()

{

...

..

DebugPrintfInit();

InitDebugPrintf(); /*Add this line*/

   

    /* Start the RTOS scheduler. This function should never return */

  vTaskStartScheduler();

...

}

Let us know if this works for you.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
2 Replies
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi LeoLiu_3670906​,

There is a small issue in the code example. InitDebugPrintf() function is not called from the application that initializes the task Task_Debug and queue debugMessageQ. Add the following line of code in main() and the code worked fine.

main()

{

...

..

DebugPrintfInit();

InitDebugPrintf(); /*Add this line*/

   

    /* Start the RTOS scheduler. This function should never return */

  vTaskStartScheduler();

...

}

Let us know if this works for you.

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes

Hi Bragadeesh,

It works fine,thanks.

Best Regards,

Leo

0 Likes