This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-MSPM0G3507: MSPM0G3507 DMA SPI AMC131M03 not working, and difficulties in sampling at more than 100 SPS

Part Number: LP-MSPM0G3507
Other Parts Discussed in Thread: MSPM0G3507, AMC131M03, SYSCONFIG

Tool/software:

Hi,

Shortly about the setup: MSPM0G3507 launchpad connected with wires to AMC131M03 EVM, the code is based on the TI examples and is using the driver lib. everything wired correctly since we can successfully communicate and configure the AMC over SPI when we use the driverlib.


We are trying to read data from an AMC131M03 over SPI with DMA, this seems to not work because the DMA transfer doesn't start even when I try to use the DL_DMA_startTransfer function. An adjacent problem which is the reason we try to use DMA in the first place is that when we use the driverlib to do SPI transfers then we get severely reduced amount of samples through ( 160SPS or so). We have the AMC configured for 4kSPS yet whenever we do something with the MCU core the amount of Data ready we get from the AMC reduces noticably.

Advice on both problems are greatly appreciated

We configure the DMA like so: and I attached the sysconfig file as well.

DL_DMA_setSrcAddr(DMA, DMA_CH2_CHAN_ID, (uint32_t) &txBuf[0]);
DL_DMA_setDestAddr(DMA, DMA_CH2_CHAN_ID, (uint32_t)(&SPI_0_INST->TXDATA));
DL_DMA_setTransferSize(DMA, DMA_CH2_CHAN_ID, len);

// Run the DMA for this burst
DL_SPI_clearInterruptStatus(SPI_0_INST, DL_SPI_INTERRUPT_DMA_DONE_RX);
/*
* Configure DMA source, destination and size from RXDATA to gRxPacket.
* The DMA transfer will start when the RX interrupt is set, which happens
* when the device receives data.
*/
DL_DMA_setSrcAddr(DMA, DMA_CH1_CHAN_ID, (uint32_t)(&SPI_0_INST->RXDATA));
DL_DMA_setDestAddr(DMA, DMA_CH1_CHAN_ID, (uint32_t) &dataRxDMA[0]);
DL_DMA_setTransferSize(DMA, DMA_CH1_CHAN_ID, len);


DL_DMA_enableChannel(DMA, DMA_CH1_CHAN_ID);
DL_DMA_enableChannel(DMA, DMA_CH2_CHAN_ID);
DL_DMA_startTransfer(DMA, DMA_CH2_CHAN_ID);