Problem with Tx Uart DMA

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

Problem with Tx Uart DMA

750 Views
12914A
Contributor III

Hi,

I found the Projekt attached below in the forums. It works well for the S32k144 EVB, but if i want to use it on a S32k146, it don't work. 

I need to send variable length per DMA on UART1, and I wrote following function, which works fine for S32k144 but not on S32k146 what is wrong?:

void LPUART1_send_DMA(uint8_t *data, uint16_t len)
{
 
    DMA->TCD[1].CSR &= ~DMA_TCD_CSR_DONE_MASK;
 
    DMA->TCD[1].SADDR = (uint32_t)data;
 
    DMA->TCD[1].CITER.ELINKNO = len;
    DMA->TCD[1].BITER.ELINKNO = len;
 
    DMA->SERQ = 1;
}
 
I hope anyone can help me
 
Best regards
 
Sandra
0 Kudos
Reply
1 Reply

712 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @12914A,

Did you create a new project for S32K146? Or are you uploading the same 144 application to the S32K146?

Please make sure the new project correctly configures S32K146 clocks, pins and such.

Best regards,
Julián

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2262682%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EProblem%20with%20Tx%20Uart%20DMA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2262682%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20found%20the%20Projekt%20attached%20below%20in%20the%20forums.%20It%20works%20well%20for%20the%20S32k144%20EVB%2C%20but%20if%20i%20want%20to%20use%20it%20on%20a%20S32k146%2C%20it%20don't%20work.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20send%20variable%20length%20per%20DMA%20on%20UART1%2C%20and%20I%20wrote%20following%20function%2C%20which%20works%20fine%20for%20S32k144%20but%20not%20on%20S32k146%20what%20is%20wrong%3F%3A%3C%2FP%3E%3CDIV%3Evoid%20LPUART1_send_DMA(uint8_t%20*data%2C%20uint16_t%20len)%3C%2FDIV%3E%3CDIV%3E%7B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20DMA-%26gt%3BTCD%5B1%5D.CSR%20%26amp%3B%3D%20~DMA_TCD_CSR_DONE_MASK%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20DMA-%26gt%3BTCD%5B1%5D.SADDR%20%3D%20(uint32_t)data%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20DMA-%26gt%3BTCD%5B1%5D.CITER.ELINKNO%20%3D%20len%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20DMA-%26gt%3BTCD%5B1%5D.BITER.ELINKNO%20%3D%20len%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20DMA-%26gt%3BSERQ%20%3D%201%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%7D%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EI%20hope%20anyone%20can%20help%20me%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EBest%20regards%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3ESandra%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2263022%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Problem%20with%20Tx%20Uart%20DMA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263022%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F232799%22%20target%3D%22_blank%22%3E%4012914A%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EDid%20you%20create%20a%20new%20project%20for%20S32K146%3F%20Or%20are%20you%20uploading%20the%20same%20144%20application%20to%20the%20S32K146%3F%3C%2FP%3E%0A%3CP%3EPlease%20make%20sure%20the%20new%20project%20correctly%20configures%20S32K146%20clocks%2C%20pins%20and%20such.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E