background image

AURIX™ TC2xx Microcontroller Training
V1.0.0

SPI_DMA_1

SPI data communication via DMA

Please read the Important Notice and Warnings at the end of this document

Содержание SPI DMA 1

Страница 1: ...AURIX TC2xx Microcontroller Training V1 0 0 SPI_DMA_1 SPI data communication via DMA Please read the Important Notice and Warnings at the end of this document...

Страница 2: ...e exchange eight bytes of data Four DMA channels are used to enable data transfer between RAM and QSPI FIFOs without CPU intervention DMA channel 1 is configured as SPI master Tx DMA channel 2 is conf...

Страница 3: ...SPI works in full duplex mode either as Master or Slave with up to 50 Mbit s The DMA module channels can be configured to transfer data from to QSPI FIFOs to from internal RAM Memory without any CPU i...

Страница 4: ...Hardware setup This code example has been developed for the board KIT_AURIX_TC297_TFT_BC Step 4 2020 01 17 Copyright Infineon Technologies AG 2020 All rights reserved...

Страница 5: ...3 32 SCLKO P02 4 17 SLSI_A P15 2 31 SLSO_0 P02 5 18 MRST P15 4 33 MRST_A P02 6 19 MTSR_A P15 5 34 MTSR KIT_AURIX_TC297_TFT_BC Step Use the stencils as illustrated Connect following pins as described...

Страница 6: ...he IfxQspi_SpiSlave_Config structure The structure is filled with default values by the function IfxQspi_SpiSlave_initModuleConfig Afterwards the following parameters are modified to enable the DMA us...

Страница 7: ...odule is done by defining an instance of the IfxQspi_SpiMaster_Config structure The structure is filled with default values by the function IfxQspi_SpiMaster_initModuleConfig Afterwards the following...

Страница 8: ...of the structure IfxQspi_SpiMaster_ChannelConfig Afterwards the slave select channel number is set through the parameter sls output and the baud rate is modified via the parameter base baudrate The fu...

Страница 9: ...upt ISR_dma_ch1 ISR calls the function IfxQspi_SpiMaster_isrDmaTransmit SPI Master receive interrupt ISR_dma_ch2 ISR calls the function IfxQspi_SpiMaster_isrDmaReceive SPI Slave transmit interrupt ISR...

Страница 10: ...nction IfxQspi_SpiSlave_exchange Enable and Start SPI Master data communication using the function IfxQspi_SpiMaster_exchange Poll for SPI slave data reception using the function IfxQspi_SpiSlave_getS...

Страница 11: ...ditionally using the debugger the behavior can be checked Add g_qspiDma to Watch window Check if g_qspiDma qspiBuffer spiSlaveRxBuffer and g_qspiDma qspiBuffer spiMasterRxBuffer are the same as g_qspi...

Страница 12: ...www infineon com aurix expert training AURIX Development Studio is available online https www infineon com aurixdevelopmentstudio Use the Import function to get access to more code examples For questi...

Страница 13: ...ty of the product for the intended application and the completeness of the product information given in this document with respect to such application For further information on the product technology...

Отзывы: