CMPS12 / CMPS14 code bricking nano 33 iot

Hello all,
I have adapted the example code from here, I2C: Arduino Examples

My adaptation adds deviation correction (currently commented out) and then outputs NEMA 0183 sentences for HDG, XDR (Pitch and Roll). The robot electronics example runs fine but recently my modified code does not. It refuses to run on the board. I upload it and then the board's COM port disappears. Window's Device Manager has 2 Arduino Nano 33 IoT devices, one under Other Devices, one under Ports (COM & LPT). Both have little yellow Warning triangles next to them. Error on the Other devices one, no driver. I locate the Arduino Nano 33 iot driver. It installs and moves to Ports (COM & LPT), no error. No Serial coming in though. The one that was originally under Ports has the error device can not start.

Things I have tried:
Commenting out not required code in my modified file. Example, commented out deviation stuff.
Driver issue above.
Changing the order of the imported libraries.
Uninstalling and then reinstalling the Arduino IDE using Run as Admin.
Rebooting
Different USB cables and ports.

Note, I can still recover the board using the bootloader double reset method.

It only happens with this sketch though, so it must be my code somehow.

Any ideas?

Arduino_CMPS14_NMEA.ino (5.57 KB)

Fixed it. Wasn't a problem with my code. I believe the problem was a weird Windows 7 64-bit driver issue. I fixed it but I still have a COM port that doesn't work listed in my Device manager. There are now two Arduino Nano 33 IoT devices under COM and LPT ports. The other works fine.

Go figure. Gotta love Driver issues.

The Arduino Nano 33 have native USB. The COM ports are virtual and are created by USB endpoints. There are two endpoint configurations used in the Arduino Nano 33, one for programming and one for Serial Monitor. Only one of the endpoints is active at a time. Windows will assign a different COM port because it can see the endpoint configuration is different.

It looks like your Windows shows you the COM port even after the corresponding USB endpoint is no longer active. It should be gone when you restart your PC.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.