Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: MIMRT1062 Serial Downloader

  1. #1

    MIMRT1062 Serial Downloader

    I've been reading the RM so I'm just curious, does anyone know:
    Does Teensy4.x respond to the serial download protocol used by the on chip serial downloader described in section 9.9 pg. 268 of the RM?
    If so, is this the protocol the the Teensy4.x loader uses? Or does the MKL02 take over on boot?
    If not then I assume none of the NXP tools like blhost will work for downloading to Teensy4.x?
    Thanks,
    John

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,845
    PJRC uses a separate bootloader processor chip to facilitate the upload to the main controller chip.

    This interface is exposed in the command line tool on github. And has been implemented in the TyCommander tool by koromix and a VisualTeensy program by luni.

  3. #3
    Junior Member
    Join Date
    Feb 2021
    Posts
    8
    Hello,

    I have read some incorrect statements regarding the serial downloader on the forum.
    The USB serial downloader is fully functionnal, only the UART variant is disabled in the fuses (not tested, I only use USB).

    To enter in serial downloader mode, you have to put an invalid image in the flash memory. Writing 0x00000000 at the beginning is enough. You can build a dumb .hex file to load with teensy loader.
    Once this image is flashed, the Teensy 4 board will always enter in USB downloader mode at power-up, unlike what I read on an other topic.

    Then, you can use the sdphost utility (VID/PID: 0x1fc9/0x0135) to upload your application (IVT, code, data) in the TCM RAM, and jump to the IVT. For an unknown reason, you cannot write to the OCRAM region (0x20200000), neither to the first 32 bits word in ITCM (0x00000000) - error unexpected write response 0x89232389.

    EDIT: I did not test to boot a Teensy/Arduino image, I build my firmware with the NXP SDK (and cmake).
    Last edited by Jory; 01-03-2022 at 10:22 AM.

  4. #4
    Quote Originally Posted by Jory View Post
    Hello,

    I have read some incorrect statements regarding the serial downloader on the forum.
    The USB serial downloader is fully functionnal, only the UART variant is disabled in the fuses (not tested, I only use USB).

    To enter in serial downloader mode, you have to put an invalid image in the flash memory. Writing 0x00000000 at the beginning is enough. You can build a dumb .hex file to load with teensy loader.
    Once this image is flashed, the Teensy 4 board will always enter in USB downloader mode at power-up, unlike what I read on an other topic.

    Then, you can use the sdphost utility (VID/PID: 0x1fc9/0x0135) to upload your application (IVT, code, data) in the TCM RAM, and jump to the IVT. For an unknown reason, you cannot write to the OCRAM region (0x20200000), neither to the first 32 bits word in ITCM (0x00000000) - error unexpected write response 0x89232389.

    EDIT: I did not test to boot a Teensy/Arduino image, I build my firmware with the NXP SDK (and cmake).
    Jory, thanks for the information, very helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •