LPSPI3 assertion at EDMA_TcdReset(edma_tcd_t *tcd) API.

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

LPSPI3 assertion at EDMA_TcdReset(edma_tcd_t *tcd) API.

467 Views
emb01_jtronix
Contributor II

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?

emb01_jtronix_0-1612241626151.png

 

settings:

emb01_jtronix_1-1612241794508.png

emb01_jtronix_2-1612241829043.png

 

 

Labels (1)
0 Kudos
1 Reply

458 Views
jeremyzhou
NXP Employee
NXP Employee

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.
-------------------------------------------------------------------------------

0 Kudos