adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4k stars 1.19k forks source link

teensy 4.1 and 4.0 builds not booting #2998

Closed jerryneedell closed 4 years ago

jerryneedell commented 4 years ago

The most recent builds for the teensy 4.1 and teensy 4.0 do nto boot for me this fails to boot

jerryneedell@jerryneedell-ubuntu-macmini:~/projects/adafruit_github/teensy_loader_cli$ ./teensy_loader_cli -mmcu=imxrt1062 -w ~/Downloads/adafruit-circuitpython-teensy41-en_US-20200602-e889287.hex

this boots OK

jerryneedell@jerryneedell-ubuntu-macmini:~/projects/adafruit_github/teensy_loader_cli$ ./teensy_loader_cli -mmcu=imxrt1062 -w ~/Downloads/adafruit-circuitpython-teensy41-en_US-5.4.0-beta.0.hex 
jerryneedell@jerryneedell-ubuntu-macmini:~/projects/adafruit_github/teensy_loader_cli$ 

same for teensy 4.0

jerryneedell commented 4 years ago

the last build that works was:

adafruit-circuitpython-teensy41-en_US-20200519-916ca9f.hex 

it starts failing with

adafruit-circuitpython-teensy41-en_US-20200520-0af5dd5.hex 

which was from PR #2898

tannewt commented 4 years ago

@hierophect Do you have teensy's you can test this with?

hierophect commented 4 years ago

Well, I've tried this on the 4.0 and something critical is getting reset outside the flash pins, I think. Commenting out reset_all_pins from port_reset results in normal operation so it's definitely a pin overwrite issue... but which pin?

tannewt commented 4 years ago

but which pin?

I'd suggest binary searching it. Make reset_all_pins only reset half of them and then repeat for the bad half.

hierophect commented 4 years ago

@tannewt yeah I tried that this morning, it actually fails with every pin in never_reset. From what I could briefly gather with the Jlink before it stopped connecting altogether, the chip might actually be crashing when it hits the never reset portion?

tannewt commented 4 years ago

"stopped connecting altogether" sounds like you are resetting the SWD pins.

hierophect commented 4 years ago

True... I'll try stepping through the reset portion more carefully and try and figure out what's going on. Maybe it isn't adding them to never reset, somehow? It'd be weird, since it works just fine on the 1010