I've been operating a turret with a AX12A via a serial connection from my PC using XBEES connected to to Serial 2 on the OpenCM. Python on the PC triggers the OpenCM to start a turret scan and return data from the board over the same serial port as a fairly continuous stream of Lidar distances and AX12A angles. It works fine for a while but after about 30 scans the firmware on the OpenCM seems to lock up. It no longer communicates via any serial port including the USB and I have to reset the board to recover. It's a bit random and doesn't always fail at the same point but never runs for more than 5-10mins. I'm running the connection at 115200 baud. I was previously using a RPI0 connected directly to serial port and had the same problem so it's not an issue specific to the XBees.
Any thoughts on how to debug this issue? If it's a memory leak how would I tell? I know the OpenCM boards tend to lock up if a lot of data goes through the USB but I'm not doing that.