Bootloader Chip For Teensy 4.0

Fixed 1 more very minor issue. Sometimes after loading a very small program, the bootloader would attempt to talk to the IMXRT chip before it was really ready. This is really a non-issue, since it will just retry and succeed when the IMXRT is ready. Probably every Teensy 4.0 & 4.1 we've ever made does this.

But now with every type of error resulting in a pattern of red LED blinks, little things like this give a false alarm of trouble. I fixed it by adding a 2 ms delay after uploading is complete. Even 100 us seems to prevent the problem, which only happens about 1 of every 10 uploads, and only with certain very small programs.

Just pulled the chips from 2 more virgin boards and soldered on freshly programmed ones. Really hoping this is the final version! I will be doing a lot more testing with these 2 boards over the weekend.
 
Does this also mean you are going to be updating the bootloader for the T4.x in the future with some of these changes to fix the issues you found?
 
@mjs513 That was first question here ... seems so as there was to have been a RED LED indication powered with or without USB Connect when charge only cable is present. I could never trigger it as expected from Beta notes - but seems Paul knew that.

Hopefully it isn't anything annoying in normal use - suppose that is only when in bootloader mode? I put a T_4.1 into bootloader to stop it running - staring at the RED LED it shows a dark micro pulse on some irregular period.

I got some 'other' boards with LiPo connect and onboard charge and the charge LED blinks annoyingly when there is no battery but USB powered - steady when charging and off when charged.
 
Does this also mean you are going to be updating the bootloader for the T4.x in the future with some of these changes to fix the issues you found?

Except for the harmless case of trying to access the IMXRT chip too early and just retrying moments later, every problem has been a case of the bootloader was relying on the many things the Teensy 4.0 & 4.1 test fixtures do. So I'm not planning to publish an update only to bring these changes to Teensy 4.0 & 4.1 boards. They're all completely unnecessary on boards which were tested by PJRC.

But I am planning to add more features in the future, like support for encrypted firmware. When that is done, these changes will come along with the new features.
 
Except for the harmless case of trying to access the IMXRT chip too early and just retrying moments later, every problem has been a case of the bootloader was relying on the many things the Teensy 4.0 & 4.1 test fixtures do. So I'm not planning to publish an update only to bring these changes to Teensy 4.0 & 4.1 boards. They're all completely unnecessary on boards which were tested by PJRC.

But I am planning to add more features in the future, like support for encrypted firmware. When that is done, these changes will come along with the new features.

Thanks Paul. Understand now.


defragster said:
@mjs513 That was first question here ... seems so as there was to have been a RED LED indication powered with or without USB Connect when charge only cable is present. I could never trigger it as expected from Beta notes - but seems Paul knew that.

Hopefully it isn't anything annoying in normal use - suppose that is only when in bootloader mode? I put a T_4.1 into bootloader to stop it running - staring at the RED LED it shows a dark micro pulse on some irregular period.

I got some 'other' boards with LiPo connect and onboard charge and the charge LED blinks annoyingly when there is no battery but USB powered - steady when charging and off when charged.
Sorry for the double question really didn't notice that in the thread otherwise wouldn't have asked.
 
Sorry for the double question really didn't notice that in the thread otherwise wouldn't have asked.

@mjs513 re : "That was first question here "

I meant that was my first question on seeing post#101 ... thought there might be something useful of import ... all that occurred to me was the 'unique blink on power only cable'

But if just that - better to let it rest for testing before risking every T_4.x shipped with some other issue - if just changed blink behavior that leads to 'new questions' about RED LED PANIC.
 
Still another update. I'm back on the T4 bootloader chip after the weekend. We had a large special order come in and of course we've been running short-staffed due to Covid social distancing, so Robin & I spent all weekend working on that order. I didn't get any dev time in over the weekend. Robin just finished boxing it all up this afternoon.

One of the virgin Teensy 4.0 boards which I had put a freshly programmed chip onto last Friday was giving strange intermittent errors, mostly the 4 blink error which indicates a likely problem with the crystal (technically, that error means JTAG works to the NXP JTAG controller but not the AWRM JTAG controller, and since they use the same signals the only difference is the state of the JTAG_MOD pin or the fact that NXP's controller doesn't require the 24 MHz crystal but the ARM port does). But it was sometimes working, sometimes not. Nothing obvious appeared to be wrong with the crystal. The other 2 boards (a 4.1 and another 4.0) seem to work perfectly. Very mysterious.

I removed that MKL02 chip and put another on the board. This time everything worked perfectly. My best guess is I failed to properly wash & dry all the flux off the board, and some was interfering (intermittently) with the crystal. That board now seems to work fine, with a fresh bootloader chip and a through washing and drying in the oven.

I've added 2 more virgin boards with the "final" bootloader, and they too are working fine - though admittedly these 2 new ones have only minutes of testing so far. Now that's a total of 5 working boards, 4 worked on the first try and the 5th was that case was intermittently failing until I replaced the chip (and very carefully washed & dried this time). Intermittent problems always worry me, but I'm feeling pretty confident this problem as leftover flux or water getting until the crystal or nearby parts.

I have 3 more virgin boards here on my workbench. If these 5 look good after a few hours of testing, I'm going to burn 3 more chip and put them onto those boards. If all looks good with those, I believe we'll start the soft release Tuesday afternoon or Wednesday morning. We'll probably start with a nearly blank product page, and over the next few days I'll write up info about the blink codes, power supply sequencing and some troubleshooting tips (believe me... very fresh in my mind right now!) My hope is we'll get feedback from everyone who actually uses the chip, so I can improve the info to be useful from the perspective of just designing a PCB and using the chip for the first time.
 
I programmed a few more chips and put them onto virgin Teensy 4.0 & 4.1 boards. Now I have these 8 boards which I'm using for "final" testing.

b1.jpg

1 of these 8 is the Teensy 4.0 which had crystal startup problems. It now seems to be working find with a new chip and thorough washing & dry to remove the liquid flux.

I'm going to put all 8 of these through their paces over the next few hours. If all 8 work well, we'll do the soft release later today.

FWIW, here's the growing pile of discarded chips. I'm pretty sure this isn't all of them. A few from last week got thrown out.

b2.jpg
 
That is good news getting those completed and good confidence in the bootloader chip able to do the job for a fresh 1062 !

So after first contact to a new 1062 it will present a factory Teensy - with unlocked adjustable fuses for future adjustment as required in end use, using unencrypted firmware stored on the external flash until a future update.

And that leaves room on the bootloader chip for future 'upload' edits and all on a common chip for T_3.2/3.5/3.6 as the MCU presents - or will the T_4.x be a separate part?
 
The T4 bootloader chip will be a completely separate part from T3. Much as I'd like to make "one chip to rule them all", the IMXRT vs Kinetis differences are just too much to support with a single chip.

Whether I will be able to make a single chip support RT1062 and RT1170 also remains to be seen. There are many important differences between those chips.
 
Seemed that might be the case as soon as I wrote out all the 3.x numbers - and skipped the LC. There was more flash you noted in the newer BL chips - but there is a lot more work it seems to make a 1062 deal with the world.

Well the fun but hard part is done - just the cringeworthy tasks of documentation and waiting for external PCB's to function. And then you can get back to work :)
 
Congratulations Paul!

Now you can breathe a sigh of relief after all the challenges with getting the bootloader working for the IMXRT1062. As @defragster said now fun begins with doing the documentation. Think you are right though better to do the documentation now while the stuff is still fresh in your head :)
 
Wow Paul. Just went through the power on sequence using those Javascript buttons. Impressive - as always. But I bet time consuming but great info!
 
I'm working today on the documentation. Just added a buttons with a little JavaScript, so you can (hopefully) visualize how the power up sequence works.

https://www.pjrc.com/store/ic_mkl02_t4.html

Very cool word with picture setup! Interesting how far along the power goes on 1062 before the bootloader gets powered. Not that I have plans to build either - but will be interesting to see how the 4.0 versus 4.1 setup is made. Does that matter for anything other than the restore code? Then there is EEPROM sizing to track - more based on the FLASH size or builder's choice.
 
But I bet time consuming but great info!

I will admit, for a while yesterday I had a case of "blank page causes writer's block", but now it's going pretty well. Hope to have it (reasonably well) finished by tomorrow. Hopefully that will be in time as chip's we've shipped yesterday and today start arriving.
 
What would be great if not too long on your web page (sorry if you are already working on it) is a fleshed out diagram on this web page (e.g. a link for a truly minimum T40 implementation diagram ; we probably don't need the BAT54C's Schottky barrier diodes if no battery is used ...) and maybe also a minimal but complete BOM we could add to our own BOMs to have a quick start on this.
 
I am making a custom board that will make great use of the RX1062. Having the bootloader chip opens up in much simpler development path where I can use the Teensy libraries in PlatformIO, and not have to deal with all of the initialization code. I have been following this thread for some time and I am happy to be able to place my order for bootloader chips today.

I wanted to say “Thank you” to Paul, for all the great work you do for this community.

i’ll be placing my order for bootloader chips today.
 
I'm working today on the documentation. Just added a buttons with a little JavaScript, so you can (hopefully) visualize how the power up sequence works.

https://www.pjrc.com/store/ic_mkl02_t4.html

Hi Paul, is it possible to share the custom Teensy IMXRT1062 schematic and PCB file? So that everyone else does not need to repeat the same work of design our custom teensy 4 board. Given that the IMXRT1062 package is BGA, making the schematic and laying out the board takes much time. And it is very likely to make errors.
 
Hi Paul, is it possible to share the custom Teensy IMXRT1062 schematic and PCB file? So that everyone else does not need to repeat the same work of design our custom teensy 4 board. Given that the IMXRT1062 package is BGA, making the schematic and laying out the board takes much time. And it is very likely to make errors.

The schematic is on the website and if you wanted to duplicate T4.x, why not buying it directly from PJRC?
 
is it possible to share the custom Teensy IMXRT1062 schematic and PCB file? ../.. it is very likely to make errors.
the pcb file should not be very useful at all to you unless you want to replicate copyrighted work, the pcb is highly integrated making it hard to reuse for a different board. Paul has provided not only the schematics but also a lot of instructions to make us successful in our integrations which is expected to be very different from the teensy board form factor anyway.
 
Back
Top