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

Thread: Running T3.2 compiled hex without a bootloader chip?

  1. #1
    Senior Member
    Join Date
    Jan 2013
    Posts
    183

    Running T3.2 compiled hex without a bootloader chip?

    Hi,

    I have an existing design that uses an integrated Teensy 3.2 module. It's also an open-source design, and so it relies on stock upstream firmware.

    Recently, for space-saving and ease-of-assembly reasons, I decided to try eliminating the Teensy module and putting a MK20DX256 chip and it's supporting circuitry onto the main PCB directly.

    Since this application doesn't require end-user USB connectivity, I omitted the Teensy bootloader (MKL02) chip and connected the appropriate pins to a JTAG header.

    On my first completed assemblies of this board, I have no problem erasing and flashing hex files onto the main MK20DX256 chip. However, the program does not seem to actually execute on the chip after it has been successfully flashed and verified. I've spent several hours troubleshooting this, but I haven't identified the problem yet.

    My question is this: Is it reasonable for me to expect a binary (hex) that was compiled for a Teensy 3.2 target to run on a blank MK20DX256 without a connected MKL02 (running the Teensy bootloader), or is this notion fundamentally flawed? Basically, I'm trying to figure out if the problem is a mistake in my design or assembly, or if the current behavior (non-functioning) is actually the expected behavior. I noticed some warnings about pin PTA4 in regards to NMI issues with blank chips, and I was wondering if this could be part of the issue? My design does not use this pin, and the physical pin is disconnected (floating).

    I also want to note that my intent is not to cut Paul (PJRC) out of the loop here. If the ultimate answer is to integrate the MKL02 chip and a USB port, and use the Teensy loader to program the boards (instead of a J-Link), then I'll do that without hesitation. Software (code) modification is not an option in this case.

    Thanks very much in advance for any insight. I'm also happy to provide any additional details if necessary.

    Best,
    Dan

  2. #2
    Senior Member
    Join Date
    Jan 2013
    Posts
    183
    And, of course, right after posting this, I discovered this thread:
    https://forum.pjrc.com/threads/27700

    And, of course, my board left VBAT floating. Tomorrow I'll try connecting VBAT to 3.3V and see what happens, and report back.

  3. #3
    Senior Member
    Join Date
    Jan 2013
    Posts
    183
    I feel strange chatting here with only myself, but I'm still going to post in case this helps someone else!

    Today I connected the VBAT pin to 3.3V, and now the board/chip works perfectly with the existing firmware file. Problem solved.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    14,446
    Hi @loglow. Have seen notes on DIY's vBat pin needs power, glad it was a simple fix. Link was interesting that skipping the RTC bypasses the issue when not used.

    That's interesting in that reading the Teensy cards it always seemed it was saying 3.0V was max on the vBat pin, was always afraid of putting 3.3 on vBat

  5. #5
    Senior Member
    Join Date
    Jan 2013
    Posts
    183
    Yeah, I stupidly looked past this aspect of the Teensy 3.2 schematic.

    I think I was thinking "I don't need the RTC or an external battery, so I'll just omit this" at the time.

    Click image for larger version. 

Name:	Teensy 3.2.png 
Views:	21 
Size:	61.9 KB 
ID:	24777

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    14,446
    ... wondering ... is this a new project for Tindie or personal

  7. #7
    Senior Member
    Join Date
    Jan 2013
    Posts
    183
    Quote Originally Posted by defragster View Post
    ... wondering ... is this a new project for Tindie or personal
    https://www.tall-dog.com/uo_C_SE.html

Posting Permissions

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