3 years ago.

Serial interrupt causes the TX to stop working after a while


Code: https://developer.mbed.org/users/ElectronicsSanta/code/Adafruit_GPS_test/rev/5c7edbae459d

Intro: The code above is a stripped down version from a project I'm working on.

Problem: If the code inside the serialRxInterrupt function is commented out, the GPS and the board work perfectly together. The GPS goes into standby and wakes up correctly. If the code remains as is on the above link, the board stops sending TX signals on serial after a while. A screenshot from Saleae Logic: https://i.imgur.com/j5dVd4f.png

The cause of this problem was calling gps.getc() while commands are being sent to the GPS. To get around this, the interrupts will not call gps.getc() while the MCU sends commands to the GPS. Code with changes: https://developer.mbed.org/users/ElectronicsSanta/code/Adafruit_GPS_test/rev/398211e4e73c

posted by Carter John 04 Jul 2017
Be the first to answer this question.