Bords not boot from USB and Battery on power up

Hello Everyone,

I'm new with microcontrollers.
I have a code in Arduino IDE to collect and send data to TTN. Everything its working fine.

How I can build a bin file to load on boot every time that the Adafruit SAMD21 (M0) start or is connected?

I have create a bin file from Arduino IDE, them load with bossa SAM-BA but the bin file seems do not start the code and instructions. I see many tutorials and videos on Internet, but all times the procedure is vague or difficult to do.

Thanks for your help.

the code you upload to arduino stays there and runs again on power up, why do you need to upload it again? Writing the whole program into flash every time you switch on the board will eventually use it up

Hi killzone_kid, thanks again for your response.

You are right.
However I have this problem on power up the node. That's wear that the code is compile and upload to the microcontroller without any error.
Once the code is upload to the microcontroller I can see on serial monitor of Arduino IDE and TTN the results.

But when I try to disconnect the microcontroller and power up I don't receive anything on TTN.

If I upload again the file into the microcontroller I see the results.

I'm using this example code. https://github.com/openwave-co-jp/arduino-lmic-master-for-LG01-JP/blob/master/examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino

Yeah that is what happens when you disconnect from pc and reconnect, IDE doesn’t reconnect monitor automatically.

Do this

plug your board back into usb
close Monitor if opened
open Monitor again
press reset button on the board

Yes yes, that's is working now but only with a USB data cable. thanks so much killzone_kid...

The first step is now working 100%.

Now, I test the same procedure connecting the board from a usb charger cable or connecting a battery and the code not boot from uploaded file. I need to add some code the file.ino?

The first approach is when I start the monitor serial the code works, but if I no start the serial monitor the code do not work. So, the problem is in the code. I'm looking for little idea to fixed the code.

It was very simple. Only deleting the serial begin on the code and its work nice nice.

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