PIC stops receiving data from digi, though digi doesn't stop recv from PIC


I have an odd and frustrating problem, found in all our devices which have a Digi and a Nordic IC (RF comms between devices) connected to a PIC18f.

We have an interrupt setup for when data is available from the Digi. The Digi is setup to connect and keep this connection to a PC. The program on the PC then sends probes to the Digi to ask it for data, which the PIC then receives in the interrupt routine, stores in an array and processes during the loop in main().

Further, the loop in main also has a part where it enters a RF routine, checking and reading any data that may be available on over RF from other devices.

The problem happens when inside the RF routine, and the Digi receives 4 bytes or more during. When this happens the interrupt is never called again.

I can reproduce this everytime, by disabling the serial interrupt for the Digi when entering the RF routine, delaying and sending 4 bytes to the digi during this delay.

It seems that if data isn’t processed from the digi, by the 4th byte something halts/freezes.

I have enabled interrupts for when the RF is busy, but this only reduces the likeliness of this happening in the field.

Further, I have changed my probes to 1 byte probes, but this only avoids the problem, doesn’t fix it or tell me what I did wrong.

I also can’t change the protocol, as certain commands will always be received from the digi, and these are always more than 4 bytes, no way around this (like data received from the PC).

I have looked at every angle i could think of, and can’t seem to see why this would happen.

The interrupt definitely doesn’t get called anymore. To prove this, I print a character and turn on a separate led for each both in the RF routine, and in the interrupt. When the freeze happens and I send data to the digi, the character doesn’t print or LED1 doesn’t flash. When entering the RF routine, I receive the character and LED2 flashes. So it really seems like the digi stops sending data when this occurs.

Thanks for any suggestions/help.
Quintin Beukes

This seems to be out of the scope of the support forum. I strongly suggest you submit this as a case to Digi technical support by going to http://www.digi.com/support/eservice

What is the scope of the forum (for future reference)?


That depends. No reason to hold back posting anything to the forum. In cases where direct tech support involvement is recommended, it will typically be indicated appropriately.