Custom Teensy bootloader problems

Iffypig1009

New member
Hi ive made my own custom teensy 4.1 board with the pjrc bootloader from here but im having some issues I cant figure out. Im using the teensy 4.1 schematic but somewhere the bootloader is failing, I was able to write code to it once, just a blinking led sketch, which ran fine, but arduino or teensy software now cannot program over it. I think its the bootloader as the bootloader led also does nothing and it programmed once so usb/mcu is not completely dead. When i try to upload code, teensy software prompts pressing the bootloader button to put the board into programming mode, but once pressed, the processor flashes up in the teensy software but the board is no longer viewable in arduino ide and the blink sketch stops. After a power cycle it resumes the original blink led sketch and shows up in arduino again.
With some probing, the only difference on the bootloader is that pin 4 goes from low before, to high after the button is pressed/ program pulled low.
I realise custom boards are a bit out of scope here but any help/ideas would be amazing thanks

Error message:
Memory Usage on Teensy 4.1:
FLASH: code:9140, data:4040, headers:8320 free for files:8104964
RAM1: variables:4832, code:6448, padding:26320 free for local variables:486688
RAM2: variables:12416 free for malloc/new:511872
Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
Failed uploading: uploading error: exit status 1

Code that im trying to upload:
void setup() {
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
}

void loop() {
}
 

Attachments

  • local schematic.png
    local schematic.png
    1.1 MB · Views: 16
  • pcb layout.png
    pcb layout.png
    1.7 MB · Views: 12
Teensy Loader has a Help / Verbose.

It shows any details about the connection or upload process - might have some indication of the failure.
 
Ok thanks found that and had a look, the code compiles, loader app launched fine but when the ide tries to reboot the teensy via usb, the device shows up for a second as a usb device then dissappears 'USB device remove callback', then theres ~60 unsuccessful retries before it gives up.
I think this is the useful snippet from the code, let me know if you would want all of it
1761412854213.png
 
Hi Paul, thanks for your reply

Schematic matches yours as far as I can tell, soldering connections on the bootloader chip itself seem all fine, I soldered the processor myself so its certainly possible theres a short somewhere under there but I can try redoing it soon once my stencil arrives.
 
Back
Top