Ladies and Gentlemen!
Sorry for bothering you.
I am still try to create of the spectroanalyser using RSSI of CC1310F128.
The external ARM send a RS232 byte - a command to begin of the of the analyse.
Then external ARM receives of the 300 RSSI values.
There is my source code for the RSSI task CC1310F128.
void Meas_RSSI (void)
{
uint16_t i = 0;
uint16_t Sft = 0;
uint32_t Cur_Freq = 500000000;
RF_CmdHandle Cmd_H;
//---------------------------------------------------
while (1)
{
for (i = 0; i < 300; i++)
{
// Calculate and set of the next current frequency value.
RF_cmdFs.frequency = (uint16_t)((uint32_t)Cur_Freq / 1000000);
RF_cmdFs.fractFreq = (uint16_t) (((uint64_t)Cur_Freq -
((uint64_t)RF_cmdFs.frequency * 1000000)) * 65536 / 1000000);
RF_cmdFs.synthConf.bTxMode = 0x0; // Synth. in RX mode.
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
// Start of the receiver for measuring of the RSSI value.
Cmd_H = RF_postCmd(rfHandle, (RF_Op*)&RF_cmdRxTest, RF_PriorityNormal, NULL, 0); // The command is posted, not RF_runCmd.
// I hope at this point the receiver is working.
Sft = 0; // This value needs only for safety - to exclude of the infinity loop.
RSSI = RF_GET_RSSI_ERROR_VAL; // Preset of the error RSSI value for the "while" could work.
while ((RF_cmdRxTest.status != ACTIVE) && // 1. The command is RX_Test is working.
(RSSI == RF_GET_RSSI_ERROR_VAL) && // 2. The RSSI level has the true value.
(Sft < 0xFFF)) // 3. The safety counter does not overflow.
{
Task_sleep (100); // It is for to be on the safe side.
RSSI = RF_getRssi (rfHandle); // Read of the RSSI.
Sft++; // Do not forget about the safety counter.
}
RF_flushCmd (rfHandle, Cmd_H, 0); // Hard stop of the receiver (Abort).
// Send of the RSSI value to RS232.
RS_Tx_Buffer [0] = RSSI;
UART_write(uart, &RS_Tx_Buffer [0], 1);
// Increment of the frequency value (The step is 20 KHz.)
Cur_Freq = Cur_Freq + (uint32_t) 20000;
}
Task_setPri (Hndl_RS232, 2); // Enable of the RS232 task (RS232 Command line -1 -> 2).
// (The external ARM does not send a command during of the RSSI measuring).
Task_setPri (Task_self(), -1); // Disable of the Meas_RSSI task.
} // while
}
I use a test signals with level up to 100 mkV with spectr wide 300 KHz.
I see of the test signal on the standard spectrum analyser.
I tested the radio signal way, It reached of the RX CC1310F128 Rx input.
I always receive of the RSSI level -127 (0x81). (All of the 300 points).
Could you help me?
Where is my error?
Sincerely your's
Maxim.