Easy way to switch from internal boot to serial downloader? (i.MX RT 1064)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Easy way to switch from internal boot to serial downloader? (i.MX RT 1064)

Jump to solution
1,902 Views
dav1
Contributor V

Is there a smart way to achieve a simple "one gpio" tact-switch override to enable "Serial Downloader"?

i.e.
BOOT_MODE: 10 = Internal boot from the internal i.MXRT1064 flash memory
BOOT_MODE: 01 = Serial Downloader to allow flashing via USB

I'd prefer if I could use just one switch (no added logic) that is held during power-up to stay in the rom bootloader. What would be easiest here? 

 

One idea would simply be to pull both BOOT_MODE[1:0] to gnd (Boot From Fuses) and have a physical switch pull-up BOOT_MODE_0. Not sure though if the default eFuse values would boot from flash in the normal case.


(I could find this in the TRM :-), but just wanted to make sure I didn't miss out on something obvious, thanks!)

0 Kudos
1 Solution
1,852 Views
carstengroen
Senior Contributor II

I try to leave the fuses intact most of the times.

I use this circuit:

carstengroen_0-1613983651380.png

 

View solution in original post

5 Replies
1,871 Views
dav1
Contributor V

Mark, thanks for the double-throw tip, convenient! I have less space tho so need to go with a tiny tiny tact this time, otherwise your suggestion is great.

Carsten, true, basic and works. Do you mind to screenshot how you wired it up?

 

I'm still thinking about BOOT_MODE 00 as the quick way out. If I understand the datasheet correctly, all defaults means serial-downloader in this mode, so I'd have to blow some fuses to ensure 00 mean boot from internal flash.

 

0 Kudos
1,880 Views
mjbcswitzerland
Specialist V

Hi

A Single-pole double-throw tactile switch will work:
Eg.
https://www.ckswitches.com/media/2629/ksc-dct.pdf

mjbcswitzerland_0-1613935440268.png

Connect pins 1 and 4 to the processor pins (both with pull-ups if the internal ones are not adequate) and connect pin 1 to GND.

Nowever, there is much more limited choice of such switches and they tend to cost multiple times the price of a standard single-pole single-throw one (eg. 5x the price and 10x less availability) and therefore it may still be best to use a MOSFET to invert the second input from a standard switch.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1064.html

0 Kudos
1,897 Views
carstengroen
Senior Contributor II

I have a single switch (momentary) that does exactly that in my designs. I use 2 resistors and a single N-FET to achieve this. Have saved me a few times during development...

0 Kudos
1,866 Views
dav1
Contributor V

I guess once booted, GPIO_AD_B0_04 == BOOT_MODE0 can be used as a normal GPIO with IRQ on rising edge?

If so, I think no P-ch fet is needed if we default to 00 (i.e. just rely on the built-in 100k pull-downs on BMODE0&1). Then the switch just have to connect BOOT_MODE0 to 3.3V (via say 10K)

this assumes we write BT_FUSE_SEL to 1

0 Kudos
1,853 Views
carstengroen
Senior Contributor II

I try to leave the fuses intact most of the times.

I use this circuit:

carstengroen_0-1613983651380.png