Other Parts Discussed in Thread: CC2591, , TIMAC, SIMPLICITI, CC1352P, CC2652P
Hi everyone,
I am using CC2530 + CC2591 and BasicRF (from the CC2530 examples) to comunicate 3 devices. The RF setup is simple: broadcast messages between the three without ACK and the radio (RX) is ON always. Two of these devices can run alone (Device 1 and 2), but in a specific condition they have to syncronize. The way how the are sync is very easy, the device 1 sends a packet, the second receives this packet and sends its own, then the device 1 receives it and so on. Seding period between device 1 and 2 is 70ms. The time between packet reception and transmition is just few miliseconds (I use Osal Timers from Zstack).
I had/have two specific problems in 2 scenarios:
SCENARIO 1:
Device 1 and 2 when are comunicating (sync. or not sync) : TX of device 1 or 2 hang out after transmitting and receiveng for 5 - 10 minutes. The problem is in the function "halRfTransmit()", specifically in the instruction "while (!(RFIRQF1 & IRQ_TXDONE));" The result of this logic AND is always 0, so the IRQ flag is never cleared. I read some discussion in the forum but there is not any solution... But in this case I implemented a workaround which consist in enabling the RFERR interrupts due to over/underflow radio and setting the RFIRQF0 = 0; RFIRQF1 = 0; RFERRF = 0; and S1CON = 0; This workaround seems run OK until now.
My question here is if this is the correct way to fix the problem or if there are another better. Has anybody has the same problem?
SCENARIO 2:
Device 1 and 2 when are comunicating (sync. TX and RX) and the third only sends packets (receive mode is OFF): RX of device 1 or 2 hang out after transmitting and receiveng sync packets and receiveing packets from the third for ~5. The problem here is the RX interrupt never is trigered, so the function "basicRfPacketIsReady()" returns always FALSE. The only way to recover the communication is performing a reset of the device 1 or 2. Here seems that the problem is RX FIFO is under or overflowed. I monitorize the RFERR register and I try to use the same workaround but it doesn't work. The RX radio is completely hang out. Even I initialize again the radio configuration with the function "basicRfInit(basicRfCfg_t* pRfConfig)" but it doesn't work. I tried also to FLUSH the RXFIFO, but without success. Other peripheral like the GPIO, UART or Osal Timers are working well, but the radio is KO.
My questions are:
1. Any idea about how avoid this problem? Why is radio OFF?
2. Reconfiguring the radio doesn't solve the problem: is there any register to reset the Radio peripheric? I don't want to reset the device...
Thanks.
Joaquim.