Hello,
I'm having a relatively curious issue with a custom PCB that I use. It has a Teensy 3.2 and an XBee S2C. I was experiencing an issue where anytime any of my code resulted in an xbee.send(), the program would come to a stop.
Initially I thought this behavior was due to a buggy I2C bus so using an InterruptTimer I added a second chunk of code that checked to see if a variable in the main loop was being incremented and if it stopped getting incremented it would trigger a software emulated restart (via a CPU_RESTART define). I ended up still having the program halting issue, so I kept digging and found it was the xbee.send method that was causing the teensy to halt and not the I2C bus. I removed the interrupt timing code and still came to the conclusion that the xbee.send method was causing issues (just to be doubly sure). After more chipping away at it, I figured out that if I increased the Xbee baudrate to 38400 this issue goes away. I don't want to go much above 38400 as I end up with a lot of bad packets at 57600 or 115200 (which also seems strange).
Does anyone have any insight into why xbee.send at low baudrates would cause this problem? I'm happy to provide relevant code chunks if needed.
Initial XBee baudrate was 9600.
New XBee baudrate is 38400.
I'm having a relatively curious issue with a custom PCB that I use. It has a Teensy 3.2 and an XBee S2C. I was experiencing an issue where anytime any of my code resulted in an xbee.send(), the program would come to a stop.
Initially I thought this behavior was due to a buggy I2C bus so using an InterruptTimer I added a second chunk of code that checked to see if a variable in the main loop was being incremented and if it stopped getting incremented it would trigger a software emulated restart (via a CPU_RESTART define). I ended up still having the program halting issue, so I kept digging and found it was the xbee.send method that was causing the teensy to halt and not the I2C bus. I removed the interrupt timing code and still came to the conclusion that the xbee.send method was causing issues (just to be doubly sure). After more chipping away at it, I figured out that if I increased the Xbee baudrate to 38400 this issue goes away. I don't want to go much above 38400 as I end up with a lot of bad packets at 57600 or 115200 (which also seems strange).
Does anyone have any insight into why xbee.send at low baudrates would cause this problem? I'm happy to provide relevant code chunks if needed.
Initial XBee baudrate was 9600.
New XBee baudrate is 38400.