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

Thread: Teensy 3.6 Custom - Serial Number

  1. #1
    Junior Member
    Join Date
    Dec 2018
    Posts
    16

    Teensy 3.6 Custom - Serial Number

    I may be missing something here, but Iím coming up against a problem. Iíve built a board based around a custom teensy 3.6 using the boot loader chip. Iíd like to flash my own serial number to the MK66 in the same way Paul does with the teensyís, for this Iíve got a J-LINK SEGGER to connect via SWD, however, without breaking the links to the bootloader IC this fails to connect, due to the state it holds the lines in I'd imagine. Does anyone know a way to achieve this?
    Iíve also noticed that even on my custom one the MAC address reports back as 04:E9:E5:FF:FF:FF, so still contains the PJRC vendor ID, I was expecting it to report back as FF:FF:FF:FF:FF:FF. Is this flashed in by the bootloader IC or is there a way to change it?

    Thanks.

  2. #2
    Junior Member
    Join Date
    May 2020
    Posts
    14
    Can you put the debug chip into reset?

    Seems to me that someone else tried what you are doing and found that putting the debug chip into reset via air rest pin caused the rest of the lines to try-state.

  3. #3
    Junior Member
    Join Date
    Dec 2018
    Posts
    16
    Thanks for the reply. Thats what I've discovered since starting this thread. The RST pin of the MKL04 is now connected to pin5 of the 10-Pin ARM SWD cable, meaning that when the SWD lines are connected the Bootloader IC is held in a reset state freeing up the lines. I've also managed to code the board so I can write to the Program Once Registers via USB and the serial console when its a fresh board, which means I now no longer need to use SWD to do it.

  4. #4
    Junior Member
    Join Date
    May 2020
    Posts
    14
    I'm a little confused here. What are the Program Once Registers? Are these on the target MCU or the boot loader chip?

  5. #5
    Junior Member
    Join Date
    Dec 2018
    Posts
    16
    They're on the target MCU, its an area in the flash that each block can only ever be written once. PJRC stores the S/N of each Teensy in here. I wanted to achieve similar for my custom boards for holding a S/N that can be used to create a unique MAC address. Theres not much Documentation on this within the Teensy architecture, but reading the Kinetis reference manual shows where the registers are located and the specific commands needed for writing these registers.

  6. #6
    Junior Member
    Join Date
    May 2020
    Posts
    14
    Ah! I understand now.

    Something like this? https://mcuoneclipse.com/2013/11/30/...tion-register/

  7. #7
    Junior Member
    Join Date
    Dec 2018
    Posts
    16
    Yes similar. I wanted my own unique id that was only 24 bits long.

Posting Permissions

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