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.
Hi all,
I have made a few modifications to clb_ex28_spi_data_export_dma sample code, but it doesn't seem to work. (the original sample code is fine)
So I'm trying to use another CLB instance (CLB2) to perform the same task but for SPIB. According to Table 9-16 of the TRM, I must use SPIB for CLB2.
So inside SysConfig I do three things
1. Create TILE2 and copy the config from TILE1
2. Create myCLBForTILE2 and copy the config from myCLBForTILE1
3. Change SPI peripheral config from SPIA to SPIB (Yes, this disables SPI for CLB1, but that's ok)
I then added initTILE2(myCLBForTILE2_BASE); and CLB_enableCLB(myCLBForTILE2_BASE); to clb_ex28_spi_data_export_dma.c
I check if it works by seeing if it enters dmaCh6ISR().
Has anyone checked if SPIB,SPIC, and SPID can be used?
Thanks in advance!
Hi Benjamin,
Thank you for using the E2E forums. I went ahead and recreated the changes you made on my own CCS project file. I’m not sure if you made these additional changes, but since you are using SPIB now and not SPIA, be sure to adjust the DMA configuration accordingly. Specifically, this means replacing the following line of code on line 146:
DMA_configMode(DMA_CH6_BASE, DMA_TRIGGER_SPIARX, DMA_CFG_ONESHOT_DISABLE | DMA_CFG_CONTINUOUS_ENABLE | DMA_CFG_SIZE_16BIT);
with
DMA_configMode(DMA_CH6_BASE, DMA_TRIGGER_SPIBRX, DMA_CFG_ONESHOT_DISABLE | DMA_CFG_CONTINUOUS_ENABLE | DMA_CFG_SIZE_16BIT);
I followed all of your changes, along with the change I just specified, and the example worked accordingly. If yours still does not work, please ensure that you have copied over the CLB tile exactly, and that you have configured “Data Exporting Through SPI Buffer” correctly under CLB within SysConfig. Please let me know if this resolved your issue.
Regards,
Peter
My bad!
Thank-you, and sorry for going through the trouble for such a silly mistake...