I've been having alot of trouble with the MKR1500 rebooting when accessing the sara r4 module.
For example if I run the SerialSARAPassthrough sketch with some extra lines added to track execution:
// baud rate used for both Serial ports
unsigned long baud = 115200;void setup() {
Serial.begin(baud);// enable the POW_ON pin
pinMode(SARA_PWR_ON, OUTPUT);
digitalWrite(SARA_PWR_ON, HIGH);Serial.println("Reseting SARA pin");
// reset the ublox module
pinMode(SARA_RESETN, OUTPUT);
digitalWrite(SARA_RESETN, HIGH);
delay(100);
digitalWrite(SARA_RESETN, LOW);
SerialSARA.begin(baud);
Serial.println("Begun SerialSARA");
}void loop() {
if (Serial.available()) {
SerialSARA.write(Serial.read());
}if (SerialSARA.available()) {
Serial.write(SerialSARA.read());
}
}
If powered by a external source it will continually restart after completing setup()
If connected to the USB it will reboot itself a few times then revert to bootloader mode.
Attempting to run other example sketches has a similar result. When running NBWebClient the device will restart itself once it reaches
while (!connected) {
if ((nbAccess.begin(PINNUMBER) == NB_READY) &&
(gprs.attachGPRS() == GPRS_READY)
The device seems to function as expected until the code attempts to do something with the NB module, at which point it restarts. This also does not happen all the time, every second day or so that i've tried it has worked as expected, running the serial passthrough as long as connecting to the web, and other days it will continually restart.
Im not sure exactly what I could be doing wrong. I have considered it might be related to the power saving mode but if my understanding is correct it should be woken up once the power pin is toggled (which it is during setup() in SerialSARAPassthrough.
Could the device be faulty?