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.

CC3220SF SPI函数回调问题

      while(1)
      {
           /* Toggle on user LED, indicating a SPI transfer is in progress */
           //GPIO_toggle(CONFIG_GPIO_LED_1);
           memset(slaveRxBuffer, 0, sizeof(slaveRxBuffer));
           transferOK = SPI_transfer(slaveSpi, &transaction);
           UART_PRINT("transferOK = %d \n\r", (int)transferOK);
           if (transferOK)
           {
               Semaphore_pend(semSPIHandle, BIOS_WAIT_FOREVER);
               UART_PRINT("SPI Continuing \n\r");
               GPIO_write(CONFIG_SPI_SLAVE_READY, 0);
                /* Wait until transfer has completed */
                sem_wait(&slaveSem);
                UART_PRINT("SPI tx wait done\r\n");

                GPIO_write(CONFIG_SPI_SLAVE_READY, 1);
           }
           else {

           }
           delay_1ms(1);
      }

上面这段代码,在SPI通讯成功若干次之后,会发生transferOK返回true,但是SPI回调函数(里面有一句sem_post(slaveSem))没有调用,从而导致程序卡在了sem_wait(&slaveSem)这里,请问这是为什么?

证实是这个问题,因为串口中SPI continuing的log打印了,但是没有打印spi tx wait done的log