Part Number:CC1200
Tool/software: Code Composer Studio
Hi
I am using CC1200EM for data transmission. The SmartRF studio exported the registers and the GPIO2 is
PKT_SYNC_RXTX |
CC120X_IOCFG2, 0x06;
Which means, the it goes high after sync word has been sent and will go low at the end of the packet. Right? But when I try to send the packets repeatedly, the first packet is sent and the GPIO2 goes low (as I see on the logic analyzer), but it doesn't go high for the next packet transmission. The MCU is MSP430G2553.
/***********(P2.2 is connected to the GPIO2)*******************************/.
P2REN |= BIT2;
P2OUT &= ~BIT2;
P2DIR &= ~BIT2;
P2IE |= BIT2;
P2IES |= BIT2;
P2IFG &= ~BIT2; // P2.2 IFG cleared
/*******************************************************************************
/******The code for data transmission is as below:***********************/
createPacket(txBuffer);
cc120xSpiWriteTxFifo(txBuffer, sizeof(txBuffer));
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;
count=0;
}
else
{
count++;
P1OUT &= ~BIT0;
}
}
/**************************************************************************************/
// **********************Port 2 interrupt service routine***************************/
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=PORT2_VECTOR
__interrupt void Port_2(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(PORT2_VECTOR))) Port_2 (void)
#else
#error Compiler not supported!
#endif
{
// Set packet semaphore
packetSemaphore = ISR_ACTION_REQUIRED;
// Clear ISR flag
P2IFG &=~ BIT2;
}
/*******************************************************************************/
Any ideas what does the problem come from?
Thanks