您好,最近在用MSP432p4111芯片的SPI来读取FPGA数据,每当过一段时间后,就会在库函数SPI_transfer(spi_adc, &spiTransaction);这一句话挂死,导致整个程序死掉,请问这是什么情况???
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.
您好,最近在用MSP432p4111芯片的SPI来读取FPGA数据,每当过一段时间后,就会在库函数SPI_transfer(spi_adc, &spiTransaction);这一句话挂死,导致整个程序死掉,请问这是什么情况???
谢谢您的反馈
在下面的链接内有相关的说明
If the driver was opened in SPI_MODE_BLOCKING, it verifies the amount of data frames to be transfered exceeds the SPIMSP432DMA_HwAttrsV1.minDmaTransferSize before performing a transfer using the DMA. SPIMSP432DMA_HwAttrsV1.minDmaTransferSize allows users to set a minimum amount of data frames a transfer must have to perform a transfer using the DMA. If the amount of data is less than this limit, the driver performs a polling transfer (unless the device is a slave with a timeout configured). This feature is provided for situations where there is little data to be transfered & it is more efficient to simply perform a polling transfer instead of configuring the DMA & waiting until the task is unblocked.
如果驱动程序是在SPI_MODE_BLOCKING中打开的,则在使用DMA执行传输之前,它会验证要传输的数据帧数量是否超过SPIMSP432DMA_HwAttrsV1.minDmaTransferSize。
SPIMSP432DMA_HwAttrsV1.minDmaTransferSize允许用户设置传输以使用DMA执行传输所必需的最小数据帧数。如果数据量小于此限制,则驱动程序将执行轮询传输(除非设备是配置了超时的从属设备)。此功能用于以下情况:要传输的数据很少,而简单地执行轮询传输而不是配置DMA并等待直到任务被阻止,这样效率更高。