LPC1769 SSP DMA data transfer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC1769 SSP DMA data transfer

1,329 次查看
dhananjayj
Contributor I

I'm using the LPC1769 controller in my project, I'm transferring the data using SSP DMA to slave but the problem there I found missing clock pulses while transferring data. Captured signals using Logic analyzer is attached below and my code for initiating the transmission also given below, Please help me if anyone finds the issue. 

 

 

void DMA_IRQHandler(void) { if (Chip_GPDMA_Interrupt(LPC_GPDMA, DmaChExtFlashWrt) == SUCCESS) { isDmaTxfCompleted = 1; Chip_GPDMA_ChannelCmd(LPC_GPDMA, DmaChExtFlashWrt, DISABLE); Chip_SSP_DMA_Disable(LPC_SSP1); return; } } uint8_t SPI_WriteBufferDMA(uint8_t *pTxBuff, uint16_t Len) { isDmaTxfCompleted = 0; Chip_GPDMA_Transfer(LPC_GPDMA, DmaChExtFlashWrt, (uint32_t) pTxBuff, GPDMA_CONN_SSP1_Tx, GPDMA_TRANSFERTYPE_M2P_CONTROLLER_DMA, Len); Chip_SSP_DMA_Enable(LPC_SSP1); uint32_t tcnt = 50000000; while (isDmaTxfCompleted == 0) { tcnt--; if (tcnt == 0) break; } Chip_GPDMA_ChannelCmd(LPC_GPDMA, GPDMA_CONN_SSP1_Tx, DISABLE); Chip_SSP_DMA_Disable(LPC_SSP1); return 0; }

Original Attachment has been moved to: 24-MHz-2-B-Samples-[2].logicdata.zip

标签 (1)
标记 (2)
0 项奖励
回复
1 回复

970 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi Dhananjay Jagadam ,

Thank you for your interest in NXP Semiconductor products and the opportunity to serve you.

I'd highly recommend you to point out the issue in the sampled data likes screenshot illustrating, and in the LPCOpen library, you can find the SSP demo which includes how to use SSP in DMA mode and please refer to it for details.

LPCOpen Software for LPC17XX|NXP 

Hope it helps.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复