m8ta
You are not authenticated, login. |
|
{486} | ||
here is an email I wrote to nordic semiconductor technical support concerning switching reception/transmission modes. see also {487} & {485} Hello, I've been having problems with switching modes on the nRF24L01. I want to implement a asymmetric bidirectional link, where there is a periodic (every ~36ms) time when the primary transmitter sends a status packet, then listens for a 32-byte command packet from the primary receiver. The command packet is for conveying configuration information, etc. I am driving both radios with blackfin DSPs using the built-in SPI port @ 4mhz, and am very careful with the CSN signal. The shock-burst feature is not enabled. Unidirectional transfer works great - I get nearly 0% dropped packets when the primary transmitter & receiver never change modes, up to a rate of about 1.5mbps. Of course, I am careful not to let the radio stay in TX mode for more than 4 ms - every 3ms i give it a 'break' by de-asserting CE. But bidirectional does not work reliably. Here is my procedure, on the primary transmitter side, for sending a status packet then changing from TX to RX & back to TX, with the initial condition that CE is asserted:
The process on the primary receiver is basically the same, but inverted. Upon receiving a packet of the correct type, it switches to transmit mode, sends off a packet, waits for the TX_DS interrupt, and switches back to RX mode. Like I said, when the transmitter and receiver never switch modes, the packets always get through without any corruption. When they switch roles for one packet, only ~ 78% get through, making the status packet -> command packet reply about 62% reliable. This is when the radio is only sending status packets - hence mostly it is in what the datasheet calls 'standby-II mode'. When the radio is also transmitting data packets, the status packet -> command packet relay is about 79% reliable, suggesting that the first packet after a switch from RX to TX mode is somehow being lost. Indeed, when I look at the IRQ signals on an oscilloscope, it is apparent that a certain percentage of the time the TX_DS interrupt is not followed by a RX_DR interrupt. so - what am I doing wrong??!! I'm desperate to make this work, and have tried almost every permutation! thanks, Tim Hanson |