I am using SPI bus to transfer data. I have defined LPSPI3 master config using config tools peripheral in eDMA mode. I am using function LPSPI_MasterTransferEDMA to send and recieve data.
Whenever I debug program it assert at assert(((uint32_t)tcd & 0x1FU) == 0U); and interrupt failed screen popup and run terminated. What should I do to resolve this problem?
settings:
Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
According to your introduction, it seems that the the demo stuck at the assert(((uint32_t)tcd & 0x1FU) == 0U) line, as the (uint32_t)tcd & 0x1FU) is not equal to 0x0, in another word, the edma_tcd_t struct's addrees is not 32-byte aligned.
You can use the debug feature of MCUXpresso to observe the address to confirm it.
In further, I'd like to suggest referring to the lpspi_edma_b2b_transfer_master demo to learn how to use LPSPI driver in edma way
Hope this is clear.
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.
-------------------------------------------------------------------------------