HI,
There is a spectrum analyzer example in the cc25330 software example, and I'd like to use it on cc2531 USB dongle. The main function is as follows. When I used the function halSampleED() in my code, the compile went well, but after I flashed the firmware to the cc2531 USB dongle, it was not recognized by my PC. Could you please help me figure it out?
Regards,
Geoff
void main( void )
{
//int8 minRssi, maxRssi, rssiOffset;
int8 rssiOffset;
appUartRxIdle = FALSE;
halBoardInit();
halUartInit(HAL_UART_BAUDRATE_115200, 0);
appConfigTimer(1000/UART_RX_IDLE_TIME);
halLedSet(1);
halTimer32kIntEnable();
halRfSetGain(HAL_RF_GAIN_HIGH);
rssiOffset= halRfGetRssiOffset();
//minRssi= MIN_RSSI_DBM + rssiOffset;
//maxRssi= MAX_RSSI_DBM + rssiOffset;
// Set chip in RX scan mode
halSetRxScanMode();
while (TRUE) {
HAL_PROCESS();
uint8 sample;
// For each RSSI sample record
for (sample = 0; sample < SAMPLE_COUNT; sample++) {
uint8 channel;
// Sample channel 11-26
for(channel = 0; channel < CHANNELS; channel++ ) {
ppRssi[channel * SAMPLE_COUNT + sample] = halSampleED(channel+CHANNEL_11, SAMPLE_TIME);
}
}
halUartEnableRxFlow(FALSE);
halMcuWaitUs(1000);
uint8 fSuccess = FALSE;
if (halUartWrite(ppRssi, sizeof(ppRssi)) == sizeof(ppRssi))
fSuccess = TRUE;
halUartEnableRxFlow(TRUE);
}
}