assert error for lpuart in FreeRTOS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

assert error for lpuart in FreeRTOS

463 Views
davepfaltzgraff
Senior Contributor I

While debugging code using the LPUART_RRTOSReceive() function, I occasionally get the following error:

 

ASSERT ERROR " ev == 0 ": file "C:/KSDK2/devices/MK22F51212/drivers/fsl_lpuart_freertos.c" Line "277" function name "LPUART_RTOS_Receive"

 

If it would happen all the time, I might be able to determine if it was something I'm doing wrong. However, most of the time the function operates as I expect. This is just a "once in a while" occurrence.

 

Can someone familiar with the inner workings of the function provide insight as to what may be going wrong? I've defined the background working buffer as 64 characters long. My typical transfers are shorter than that.

 

At this time, it appears that reducing the baud rate helps, but I am not sure.

 

Thanks

Labels (1)
0 Kudos
2 Replies

252 Views
Jmart
NXP Employee
NXP Employee

David,

I checked out the code you're referring to but I don't see the use for the assert in that location. The function xEventGroupClearBits returns the value of the event group prior to the clearing of bits, but the assert seems to assume that the RTOS_UART_COMPLETE flag is being cleared and then checked. Simply removing the assert should solve the issue you're seeing now. I'll ask the driver ownerto take a look at this code and provide feedback.

Jason

0 Kudos

252 Views
davepfaltzgraff
Senior Contributor I

This is just a little feedback and may help provide additional information. I changed my program to run in VLPR mode and thus had to change the LPUART operating parameters. This caused the problem to happen all the time even at 9600 baud. Commenting out the assert statement was enough to make the program work. Everything appears to be OK on the serial link, but testing has just be cursory at this point.

Thanks...

0 Kudos