Arduino NANO 33 BLE Sense disconnects from port after uploading


I am using the Arduino Nano 33 BLE Sense for my project and it seems to work properly when I use the micro_speech built-in TensorFlow Lite example.

However, when I upload my own TF Lite model the code compiles, uploads and then I get a 'Board at /dev/cu.usbmodem14201 is not available' when I open the serial monitor. Can anyone help me with this or guide me on what to do?

Thanks in advance!

Try add this to your setup

  for (int i = 10; i > 0; i--) {
    Serial.print(' ');

and then you can wait a few secs for the prog port to close and manually reselect the monitor port before opening the monitor AND still see any startup messages