uint8 txBuffer[32] = {0};
cc120xSpiWriteTxFifo(txBuffer,sizeof(txBuffer));
trxSpiCmdStrobe(CC120X_STX);
trxSpiCmdStrobe(CC120X_STX);
// Wait for interrupt that packet has been sent.
// (Assumes the GPIO connected to the radioRxTxISR function is
// set to GPIOx_CFG = 0x06)
while(packetSemaphore != ISR_ACTION_REQUIRED);
// Clear semaphore flag
packetSemaphore = ISR_IDLE;
HAL_NVIC_EnableIRQ(EXTI4_IRQn);
cc120xSpiReadReg(CC120X_NUM_TXBYTES, &txBytes, 1);
// (Assumes the GPIO connected to the radioRxTxISR function is
// set to GPIOx_CFG = 0x06)
while(packetSemaphore != ISR_ACTION_REQUIRED);
// Clear semaphore flag
packetSemaphore = ISR_IDLE;
HAL_NVIC_EnableIRQ(EXTI4_IRQn);
cc120xSpiReadReg(CC120X_NUM_TXBYTES, &txBytes, 1);
question:
1. when i send 1 times, the txBytes is 0x20;
2. when i send 2 times, the txBytes is 0x3f;
3 when i send 3 times, the txBytes is 0x5e;
4. when i send 4 times, the txBytes is 0x7c;
5. when i send 5 times, STX status byte is 0x7f,which denote TX FIFO has over/underflowed.
why the Tx FIFO error? the txBytes is must 0x20 when i have finished send the packet?