Other Parts Discussed in Thread: SYSCONFIG, SIMPLELINK-CC13XX-CC26XX-SDK
Greeting. Thanks ahead for helping out.
Background
I tried to confifure the SPI module on the CC2652 LAUNCHXL board. With setting specified below:
Parameters
SPI_Params signalAcquisitionTask_spi_params; SPI_Params_init(&signalAcquisitionTask_spi_params); signalAcquisitionTask_spi_params.mode = SPI_MASTER; signalAcquisitionTask_spi_params.bitRate = 4000000; signalAcquisitionTask_spi_params.dataSize = 16; signalAcquisitionTask_spi_params.frameFormat = SPI_POL0_PHA1; signalAcquisitionTask_spi_params.transferMode = SPI_MODE_CALLBACK; signalAcquisitionTask_spi_params.transferCallbackFxn = signalAcquisitionTask_spiTransmissionCb;
Transaction
SPI_Transaction signalAcquisitionTask_spi_transaction; uint16 signalAcquisitionTask_spi_txBuffer[16]; uint16 signalAcquisitionTask_spi_rxBuffer[16]; signalAcquisitionTask_spi_transaction.arg = NULL; signalAcquisitionTask_spi_transaction.txBuf = signalAcquisitionTask_spi_txBuffer; signalAcquisitionTask_spi_transaction.rxBuf = signalAcquisitionTask_spi_rxBuffer; signalAcquisitionTask_spi_transaction.count = frameSize;
Issue
When SPI_transfer is called, an HWI exception is raised. Somehow the code hit the Hwi_excHandlerAsm. There is not much information i can gather from the ROV.
Investigation
I suspect that there might be incorrect setup on the SPICC26X2DMA_Object and SPICC26X2DMA_HWAttrs. Hence the values before the execution of SPI_transfer is captured.
SPICC26X2DMA_Object
SPICC26X2DMA_HWAttrs
I wonder would it be the issue in the null head and tail Ptr which include the Hwi_excHandlerAsm pointer. Just a wild thought.
Question
1. Any idea about the issue?
2. Is there any way I can put a breakpoint in the SPICC26X2DMA.c for debugging?
3. I recall a post about heap issue mentioned. I did check the heap but i didnt find anything useful. Is Heap management a concern in the application design.
Please tell me if i can provide more detail. Thanks in advance.