LPC55S69 EVK SPI DMA Example error when changing Flexcomm interface

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

LPC55S69 EVK SPI DMA Example error when changing Flexcomm interface

3,280 次查看
SrinathVelavan
Contributor III

Hello, 

I am trying to run the SPI_DMA example for LPC55S69 on the EVK. By default the FC7 configuration is working fine with expected outputs. 

But, when we change the flexcomm interface from FC7 to FC4, there is no data transfer happening on the DMA channel. 

I have changed the pin_mux pins and the following lines in the main code

#define EXAMPLE_SPI_MASTER            SPI4
#define EXAMPLE_SPI_MASTER_IRQ        FLEXCOMM4_IRQn
#define EXAMPLE_SPI_MASTER_CLK_SRC    kCLOCK_Flexcomm4
#define EXAMPLE_SPI_MASTER_CLK_FREQ   CLOCK_GetFlexCommClkFreq(4U)
#define EXAMPLE_SPI_SSEL              1
#define EXAMPLE_DMA                   DMA0
#define EXAMPLE_SPI_MASTER_RX_CHANNEL 18
#define EXAMPLE_SPI_MASTER_TX_CHANNEL 19
#define EXAMPLE_MASTER_SPI_SPOL       kSPI_SpolActiveAllLow

#define TRANSFER_SIZE 64U /*! Transfer dataSize */

 /* attach 12 MHz clock to SPI3 */
    CLOCK_AttachClk(kFRO12M_to_FLEXCOMM4);

   /* reset FLEXCOMM for SPI */
    RESET_PeripheralReset(kFC4_RST_SHIFT_RSTn);

Kindly request anyone to let me know if I am missing anything in the code. The examples of Polling SPI and Interrupt SPI work fine when we change the Flexcomm interface. Facing issues only with I2C DMA and SPI DMA code.

NOTE: Attached outputs for reference.

TIA

 

0 项奖励
回复
2 回复数

3,246 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @SrinathVelavan 

Recommend you debugging step by step, check the registers of DMA, whether they are configured well

as your requirements, and source address of DMA. Also check whether enble Flexcomm4 clock.

 

BR

Alice

0 项奖励
回复

3,240 次查看
SrinathVelavan
Contributor III

Hi Ms.Alice,

Thank you for the suggestion. Will try this and update. 

 

0 项奖励
回复