Hi
I'm having a problem with Feather M0 entering sometimes bootloader mode while I connect the power. I need to disable the double tap of the RESET (button) feature because a HW fix is difficult at this point.
Is there a way to change the bootloader FW and upload a new one without this feature?
Thanks in advance
Bootloader - disable double tap
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15662
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Bootloader - disable double tap
The SAMD21 bootloader source is at https://github.com/adafruit/uf2-samdx1.
Question: how do you plan to get into the bootloader?
Dave
Question: how do you plan to get into the bootloader?
Dave
- Jimis
- Posts: 7
- Joined: Thu Sep 29, 2022 9:58 am
Re: Bootloader - disable double tap
Thanks for the reply.
I'm not sure how to compile these files. I opened them with VS code and found the point where the double tap is. But I don't know how to compile them properly to get the uf2 or .bin file which is needed to upload the new bootloader.
If I have a .bin file I can produce the .uf2 with a Python conversion script according to adafruit (https://learn.adafruit.com/adafruit-fea ... er-2929771).
Any info on that?
I'm not sure how to compile these files. I opened them with VS code and found the point where the double tap is. But I don't know how to compile them properly to get the uf2 or .bin file which is needed to upload the new bootloader.
If I have a .bin file I can produce the .uf2 with a Python conversion script according to adafruit (https://learn.adafruit.com/adafruit-fea ... er-2929771).
Any info on that?
- dastels
- Posts: 15662
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Bootloader - disable double tap
I haven't tried that myself, but I see a Makefile so I'd start with that.
Dave
Dave
- Jimis
- Posts: 7
- Joined: Thu Sep 29, 2022 9:58 am
Re: Bootloader - disable double tap
I have no idea how to compile this thing. I tried downloading PlatformIO and Auto Build Marlin but no luck.
I can't build it.
I can't build it.
- dastels
- Posts: 15662
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Bootloader - disable double tap
Back to your original post: how is connecting power and double tapping reset connected?
Dave
Dave
- Jimis
- Posts: 7
- Joined: Thu Sep 29, 2022 9:58 am
Re: Bootloader - disable double tap
I will answer your question but I recommend not to focus on the HW cause I have gone over it and there is no viable solution. I must disable the bootloader double tap. I include the feather M0 schematic.
The problem is that Reset signal is pulled-up to 3.3V by an internal resistor in SAMD μC. When you unplug-plug the power the Reset signal drops a few times until it gets stable. The bootloader sometimes mistakenly considers these drops as double tap so it goes into bootloader mode. An RC on the reset line doesn't solve the problem and other HW solutions (555 latch) will be more complicated.
Solution is to disable the double tap in bootloader FW and upload the new one. If anyone has experience in Visual Code he would probably do it in a 5 minutes. I don't.
I'm trying to build the bootloader code in this link https://github.com/adafruit/uf2-samdx1
The problem is that Reset signal is pulled-up to 3.3V by an internal resistor in SAMD μC. When you unplug-plug the power the Reset signal drops a few times until it gets stable. The bootloader sometimes mistakenly considers these drops as double tap so it goes into bootloader mode. An RC on the reset line doesn't solve the problem and other HW solutions (555 latch) will be more complicated.
Solution is to disable the double tap in bootloader FW and upload the new one. If anyone has experience in Visual Code he would probably do it in a 5 minutes. I don't.
I'm trying to build the bootloader code in this link https://github.com/adafruit/uf2-samdx1
- Attachments
-
- feather_schem.png (62.85 KiB) Viewed 1508 times
- dastels
- Posts: 15662
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Bootloader - disable double tap
Weird. I have never encountered that. I'll ask around about building the bootloader.
My earlier question remains... how do you foresee getting into the bootloader if you remove the double-reset?
Dave
My earlier question remains... how do you foresee getting into the bootloader if you remove the double-reset?
Dave
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Bootloader - disable double tap
what if you put a 1uF or larger cap between reset and ground? to compile we use msys2 (or cygwin) on windows and then compile packages in there
this guide is old but maybe relevant https://learn.adafruit.com/windows-tool ... r/overview
this guide is old but maybe relevant https://learn.adafruit.com/windows-tool ... r/overview
- Jimis
- Posts: 7
- Joined: Thu Sep 29, 2022 9:58 am
Re: Bootloader - disable double tap
For now I don't care about the bootloader. If I can't get in in the future I could use SWD to load it again. If I am able to compile maybe I can find another solution programmatically.
Already tried using large caps. Gets better but the problem remains.adafruit2 wrote: ↑Mon Oct 03, 2022 11:05 am what if you put a 1uF or larger cap between reset and ground? to compile we use msys2 (or cygwin) on windows and then compile packages in there
this guide is old but maybe relevant https://learn.adafruit.com/windows-tool ... r/overview
Compile method with msys2 looks a bit of a pain but will give it a try if I have nothing else to work with.
- Jimis
- Posts: 7
- Joined: Thu Sep 29, 2022 9:58 am
Re: Bootloader - disable double tap
Which file to I select to run the "make" command in cmd ?
I tried also loading the files in Microchip Studio (ex Atmel Studio) but I can't build it cause there is a file missing uf2_version.h (!!!)
I couldn't even find this file on the internet anywhere !
I tried also loading the files in Microchip Studio (ex Atmel Studio) but I can't build it cause there is a file missing uf2_version.h (!!!)
I couldn't even find this file on the internet anywhere !
- Attachments
-
- Screenshot_1.jpg (34.34 KiB) Viewed 1460 times
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Bootloader - disable double tap
how to compile the bootloader and use makefiles is outside our scope of tech support- the code is all there but one must have the knowhow of how to build ARM cross-compilation.
you may want to hire an electrical/firmware engineer to help you!
you may want to hire an electrical/firmware engineer to help you!
- Jimis
- Posts: 7
- Joined: Thu Sep 29, 2022 9:58 am
Re: Bootloader - disable double tap
Well I only wanted someone to point me to the right direction. I figured it out after long read so I post it here for others. Like I said for someone who used VS code this was a piece of cake.
The key to build this is to run the "makefile" file inside the program folder. You need to open VS code and install an extension called "Makefile tools" (others could be available). Then you run the extension and it finds the file automatically.
Ofc I have other issues now I get an error: fatal: bad default revision 'HEAD'
but that's another issue, I wouldn't expect it to be that easy to work anyway.
The key to build this is to run the "makefile" file inside the program folder. You need to open VS code and install an extension called "Makefile tools" (others could be available). Then you run the extension and it finds the file automatically.
Ofc I have other issues now I get an error: fatal: bad default revision 'HEAD'
but that's another issue, I wouldn't expect it to be that easy to work anyway.
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Bootloader - disable double tap
sounds like maybe somethign wierd with the git checkout process, HEAD is what git calls the latest version
Please be positive and constructive with your questions and comments.