Hi NXP
I'm doing a real-time transmission with a lot of data by using I.MXRT1060 board. When I started to send data, the assert error came out in a while.
Then the data tramnsmission stoped.
Could you help me figurt out this pls?
Thanks
Hello Zhou Zhou,
The problem you are having it's in the assert of the following function.
/*!
* param base LPUART peripheral base address.
* param data Start address of the data to write.
* param length Size of the data to write.
*/
void LPUART_WriteBlocking(LPUART_Type *base, const uint8_t *data, size_t length)
{
assert(data);
/* This API can only ensure that the data is written into the data buffer but can't
ensure all data in the data buffer are sent into the transmit shift buffer. */
while (length--)
{
while (!(base->STAT & LPUART_STAT_TDRE_MASK))
{
}
base->DATA = *(data++);
}
}
The behavior you are facing is due to problems with the parameter "data" of the function. I have some questions: How are you calling this function in your application? Are you sending const data? Are you passing start address of the data you want to write?
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------