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

Thread: Prevent anyone from reading your code on Teensy 3.6

  1. #1
    Junior Member
    Join Date
    Dec 2018
    Location
    Antwerp, Belgium
    Posts
    1

    Prevent anyone from reading your code on Teensy 3.6

    Hi,

    Is it possible to 'lock' the program in the Teensy 3.6, so that the code is prevented from reading by someone else?

    Greetings,

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,358
    from : ...\hardware\teensy\avr\cores\teensy3\mk20dx128.c
    // Flash Security Setting. On Teensy 3.2, you can lock the MK20 chip to prevent
    // anyone from reading your code. You CAN still reprogram your Teensy while
    // security is set, but the bootloader will be unable to respond to auto-reboot
    // requests from Arduino. Pressing the program button will cause a full chip
    // erase to gain access, because the bootloader chip is locked out. Normally,
    // erase occurs when uploading begins, so if you press the Program button
    // accidentally, simply power cycling will run your program again. When
    // security is locked, any Program button press causes immediate full erase.
    // Special care must be used with the Program button, because it must be made
    // accessible to initiate reprogramming, but it must not be accidentally
    // pressed when Teensy Loader is not being used to reprogram. To set lock the
    // security change this to 0xDC. Teensy 3.0 and 3.1 do not support security lock.
    #define FSEC 0xDE
    Forum search on FSEC might have more details - but that comment doesn't address T_3.5/3.6.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,969
    It applies the same to 3.5 and 3.6.

Posting Permissions

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