LPC55S16 SPIM3 with DMA0 NO isr

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

LPC55S16 SPIM3 with DMA0 NO isr

642 Views
ruyi
Contributor I

Hello

I am trying to use DMA with SPIS (Flexcomm3) on LPC55s16. I have this current setup:

I can't recieve isr from SPIM other board DATA but original sample code use SPIS (Flexcomm7) can recieve . I can't find the problem is?

#define EXAMPLE_SPI_SLAVE SPI3
#define EXAMPLE_SPI_SLAVE_IRQ FLEXCOMM3_IRQn
#define EXAMPLE_SPI_SSEL 1
#define EXAMPLE_DMA DMA0
#define EXAMPLE_SPI_SLAVE_RX_CHANNEL 10//18
#define EXAMPLE_SPI_SLAVE_TX_CHANNEL 11//19
#define EXAMPLE_SLAVE_SPI_SPOL kSPI_SpolActiveAllLow
#define TRANSFER_SIZE 64U /*! Transfer dataSize */

 

POWER_SetBodVbatLevel(kPOWER_BodVbatLevel1650mv, kPOWER_BodHystLevel50mv, false);
/* attach 12 MHz clock to FLEXCOMM0 (debug console) */
CLOCK_AttachClk(kFRO12M_to_FLEXCOMM0);

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

/* reset FLEXCOMM for SPI */
RESET_PeripheralReset(kFC3_RST_SHIFT_RSTn);
//RESET_PeripheralReset(kFC7_RST_SHIFT_RSTn);

BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitDebugConsole();

/* Print project information. */
PRINTF("This is SPI DMA transfer slave example.\r\n");
PRINTF("This example will communicate with another master SPI on the other board.\r\n");
PRINTF("Slave board is working...!\r\n");

/* Initialize the SPI slave instance. */
EXAMPLE_SlaveInit();

/* Configure DMA for slave SPI. */
EXAMPLE_SlaveDMASetup();

/* Start SPI DMA transfer. */
EXAMPLE_SlaveStartDMATransfer();

/* Waiting for transmission complete and check if all data matched. */
EXAMPLE_TransferDataCheck();

/* De-intialzie the DMA instance. */
DMA_Deinit(EXAMPLE_DMA);

/* De-intialize the SPI instance. */
SPI_Deinit(EXAMPLE_SPI_SLAVE);

while (1)
{
}

 

0 Kudos
Reply
1 Reply

584 Views
RaRo
NXP TechSupport
NXP TechSupport

Hello @ruyi,

Just for double check, did you made the same changes to the SPIM to work with FLEXCOMM3?

Also, did you modify the pin configuration in BOARD_InitBootPins(); to work with the FLEXCOMM3 instead of FLEXCOMM7 pins?

Best regards, Raul.

0 Kudos
Reply