Hi,
I am using the swrc085b (Packet Error Rate application example) source code, and I am stuck. Without modifications to the original files, running the debugger on the SmartRF04EB, the code gets stuck in the clock intialization routine:
halPowerClkMgmtSetMainClkSrc(); waiting for the clock to stabilize.
When I remove the dependency in the code on the LCD/button interface and hardcode frequency and dataRate, the code executes right on through this ClkMgmt routine (this doesn't make sense to me, but that's what it does), presumably finding a stable clock, but never sees a valid packet sent from a second SmartRF04EB using the SmartRF Studio 7.
I don't have a 'known good' situation to work with.
Can you explain why the clock won't stabilize in the first case?
Is there an apps engineer that could take a look at the code I have?
Thanks.
Is there an update? Phone tech support told me to bump my post.
Okay -
My code runs great on the SmartRF04 board. This is good.
My board, however, gets stuck in the " while (!pktRcvdFlag); " loop of the demo code.
TI support has gone over my schematic and says it looks right. The ground pad of the CC1110 is attached to ground with many vias. Running SmartRF Studio on my board doing continuous Rx shows spikes in the RSSI when packets are sent from the demo board.
For some obscure (to me) reason, I cannot get the ISR to trigger indicating that a packet has been received on my board.
I've received this answer from TI:
Yes, there are register settings that can control the required RSSI before detection of the sync word. See the AGCCTRLx registers. However, the fact the code works on the EM boards says the code is probably not the problem. Are you are certain the ground pad underneath the part is properly soldered? If you can get -50dBm from SmartRF Studio, can you run any of the pacet tests from SmartRF Studio as well? Are you able to confirm they are getting the expected output power when in continuous transmit mode with no modulation?
Can you add some code to monitor the sync detect signal and output its state on a GPIO? This will tell us if the hardware is seeing the packet and if the software is just not responding.
I will need more information on how to implement these things - sync detect is where? How do I implement this code?
On the SmartRF04EB, I've implemented:
if (RFIF & 0x01) SET_LED1(); else CLR_LED1();
This seems to work - I get the LED on when I send a packet from the SmartRF04. Not on my board.
Is this doing the Signal Detect you are asking for?
I am trying it currently for my purpose. I am for the time being not using SimpliciTI because I want a star network with around 50 EDs for only one AP without using RE. The AP RAM memory fills to full if I try to go for beyond 33 EDs. The contents of sPersistInfo grab it all.
I am using it in CC1110 chipcon SOC_BB 1.1 EVM. and planing to port it in CC1111 usb dongle which comes with chronos watch kit. I do not have another CC1110 with me.
I have removed the LCD display code from every where. For all selections I did following changes:
radioConfigure(DATA_RATE_1_CC1110/*selectDataRate()*/, FREQUENCY_4_CC1110/*selectRadioFrequency()*/);
and
mode = RADIO_MODE_RX ; //selectMode();
/*
// Preset data rate alternatives#define NUMBER_OF_DATA_RATES_CC1110 3#define DATA_RATE_1_CC1110 250000 // bps. NOTE: If you alter these#define DATA_RATE_2_CC1110 38400 // values you will also have to#define DATA_RATE_3_CC1110 1200 // modify register settings in // radioConfigure() in // per_test_radio.c
// Preset frequency alternatives#define NUMBER_OF_FREQUENCIES_CC1110 4#define FREQUENCY_1_CC1110 915000 // kHz. NOTE: If you want to alter#define FREQUENCY_2_CC1110 903000 // these values you will also have#define FREQUENCY_3_CC1110 868000 // to modify the register settings#define FREQUENCY_4_CC1110 433500 // radioConfigure() in // per_test_radio.c
*/
I am seeing that the receive interrupt is triggering and getting some data on the rxBuffer in following two ways.
void halPowerClkMgmtSetMainClkSrc(UINT8 source){ // source can have the following values: // CRYSTAL 0x00 /* High speed Crystal Oscillator Control */ // RC 0x01 /* Low power RC Oscillator */ if(source) { CLKCON |= OSC_BIT; // starting the RC Oscillator while(!HIGH_FREQUENCY_RC_OSC_STABLE); // waiting until the oscillator is stable SLEEP |= OSC_PD_BIT; // powering down the unused oscillator } else {
The commented code gives { 0x05 0x14 0x21 0x52 0x67 0x71 0xD8 0x7F }
//SLEEP &= ~OSC_PD_BIT; // powering down all oscillators //while(!XOSC_STABLE); // waiting until the oscillator is stable //asm("NOP"); // CLKCON &= ~MAIN_OSC_BITS; // starting the Crystal Oscillator // SLEEP |= OSC_PD_BIT; // powering down the unused oscillator
The code below gives { 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 } ?? SLEEP &= ~OSC_PD_BIT /*SLEEP_OSC_PD*/ ; while( !(SLEEP & 0x40 /*SLEEP_XOSC_S*/) ); CLKCON = (CLKCON & ~(0x07/*CLKCON_CLKSPD*/ | 0x40/*CLKCON_OSC*/)) | 0x00 /*CLKSPD_DIV_1*/; while (CLKCON & 0x40/*CLKCON_OSC*/); SLEEP |= ~OSC_PD_BIT /*SLEEP_OSC_PD*/ ; for (int i=0; i<20000; i++); // Simple delay } }
To confirm its working I need another device. For now I am trying it with CC1110 post which with CC1111.
Looking forward for any kind of help.
K found out .. the RF settings were not correct. Now the AP and ED pair is working nicely. The AP can get all the data of all the EDs around.
But I have one issue. Whenever IRQ_RXOVF occurs the AP doesn't receive any further data even after RFIF &= ~IRQ_RXOVF; . What could be the issue.
How to handle such event?
Hi
From the CC1110 data sheet: "To exit RX_OVERFLOW and/or TX_UNDERFLOW state, an SIDLE strobe command should be issued."
this must be done in addition to clear the interrupt flag.
Siri