Part Number: TMS320F28379D
Other Parts Discussed in Thread: SYSCONFIG
Hello all,
I am working on a project where we would like to use the F28379D as a peripheral over SPI. To this end we are trying to configure the device to use DMA. Our current test setup is a Raspberry Pi as the controller and the F28379D as the peripheral. Currently, we are doing all testing on core one to avoid memory/peripheral ownership issues.
We have verified this setup works by using the write/read blocking commands and have succesfully completed transactions with the current settings. To start, we used the SPI and DMA examples provided by TI to guide our implementation.
Attached is a minimal example using the driverlib and sysconfig where the DMA transfer works on trigger from SPI TX interrupt if we transfer to an interal buffer (use #define ALT_EXAMPLE), but when we try to transfer to the SPI TX FIFO buffer we get garbage data. Additionally, we have an interrupt set to occur after the DMA transaction completes and can confirm it happens in either case.
As far as we can tell this indicates the trigger is correct (since TX isn't filled we repeatedly trigger the DMA until it's fully transfered to the example_buf in the ALT_EXAMPLE). It also indicate the SRC pointer is correct since the correct data appears in example_buf.
Additionally, we are following guidance of ```18.2.8.2 Receiving Data Using SPI with DMA``` and have RXFFIL set to 8 samples and DMA_BURST_SIZE set to 7.
Hopefully there is a small issue in our configuration as we are not sure where next to go to debug the issue. Thank you for any help.
SPI Config in Sys Config:

DMA Config:

SRC and DEST of DMA are configured in code (exerpt from empty_driverlib_main.c):
#ifdef ALT_EXAMPLE
DMA_configAddresses(example_spi_TX_DMA_BASE, example_buf, test_buf);
DMA_configBurst(example_spi_TX_DMA_BASE, 8, 1, 1); // Burst Size, Src step, dest step
DMA_configTransfer(example_spi_TX_DMA_BASE, 16, 1, 1); // Transfer Size, Src Step, dest step
#else
DMA_configAddresses(example_spi_TX_DMA_BASE, example_spi_TX_DMA_ADDRESS, test_buf);
DMA_configBurst(example_spi_TX_DMA_BASE, 8, 1, 0); // Burst Size, Src step, dest step (Notice how dest step is zero)
DMA_configTransfer(example_spi_TX_DMA_BASE, 16, 1, 0); // Transfer Size, Src Step, dest step (Again, notice step is zero)
#endif
DMA_startChannel(example_spi_TX_DMA_BASE);
Driverlib Empty CPU1 Example CCS Project.zip
