LPC54102 Triggering SPI DMA from PININT Channel

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

LPC54102 Triggering SPI DMA from PININT Channel

678 Views
kennethkong852
Contributor I

Hello!

I am currently trying to interface my LPC54102 with a 24-bit ADC which is expected to run at its max data rate (~150kSPS), via the SPI interface.  This ADC features an active low data ready interrupt pin.

The way that I want it to work is that whenever the MCU detects a falling edge on the selected PININT channel, the SPI DMA would immediately get triggered to send out the command to read the ADC DATA.

When such data (4 bytes) has been received, I would like to have it automatically stored.  I am assuming that the SPI DMA can also do that for me?  So in this case, I may need both the TX and RX channel DMA'ed.

That said, I cannot seem to find a good example linking this procedure mentioned.  May anyone please kindly point me to the correct example or examples?

NOTE: I'm using this lib API -> lpc5410x_xpresso54102_keil_iar_v3.04.000

Thank you very much in advance!

#lpc54102

Labels (1)
0 Kudos
Reply
3 Replies

626 Views
kennethkong852
Contributor I

Thank you for your response.  The example that you were pointing to is non-LPCOpen API.  Would you happen to have an LPCOpen example that would walk through configuring a SPI MASTER with DMA support?

0 Kudos
Reply

620 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

I apologize, but there are no other examples from LPCOpen that the ones included in LPCOpen Software for LPC5410X | NXP Semiconductors. The example that could help you is the "rom_spis_int_dma".

 

Regards,

Ricardo

0 Kudos
Reply

641 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

Hope you are doing well. We do not have a ready to use example that fits your full scenario.

 

For the DMA feature, I would recommend checking the spi_dma_b2b_transfer SDK example.

 

In this example, one spi instance as master and another spi instance on the other board as slave.

Master sends a piece of data to slave, and receive a piece of data from slave. The examples check if the data received from slave to master and master to slave are correct.

 

For the DMA trigger source, please refer to LPC5410x User manual.

 

Best Regards,

Ricardo

0 Kudos
Reply