Part Number: CC1310
Hi, I'm working with the CC1310 devices. I implement the WoR mode in my project. I have RX and TX session implemented and the consumption of device is ok for us. The problem is that in this condition I don't manage to use the serial interface. When I take a command on the serial port the CC1310 device don't read the command, but If I send the same command more time, somethings the command has been accepted. Now I have this code:
void uart(UArg arg0, UArg arg1)
{
uint8_t i;
if (uart == NULL)
{
System_abort("Error opening the UART");
}
while(1) { //If I put the while in this point, the UART don't works very well.
RF_cmdFs.frequency = configInRam.Freq/10 + 860;
RF_cmdFs.fractFreq = configInRam.Freq % 10 * 6553;
RF_cmdPropRadioDivSetup.txPower = outputPower[configInRam.Power-48].txPower;
RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRadioDivSetup, RF_PriorityNormal, NULL, 0);
//while(1) If I put the while in this point, the UART it works, but the consumption of the device is around 1.2mA(very high for us).
if (From_RF1[0] != NULL)
{
RX_part(From_RF1);
}
else
{
RF_cmdPropTxAdv.pPkt = 0;
UART_read(uart, &From_RS232, sizeof(From_RS232));
if (From_RS232[0] == 0) lettura_stato();
else
{
PIN_setOutputValue(pinHandle, CTS,Out_High);
Analyze_RS232_String(From_RS232);
if (RS232_To_Local == 0) TX_part(From_RS232);
if (From_RS232[0] != 0)
{
for (i = 0; i < MAX_LENGTH; i++) From_RS232[i] = NULL;
for (i = 0; i < MAX_LENGTH+5; i++) packet[i] = NULL;
RF_cmdPropTxAdv.pPkt = 0;
}
}
}
}
}Now, the RF_Postcmd and RF_runcmd, do they affect the operation of the serial port?
READ THE TWO LINE COMMENT(WHILE)