Code Monkey home page Code Monkey logo

teensy4-selfrebootor's Introduction

teensy4-selfrebootor

Crates.io Crates.io License Build Status docs.rs

This crate provides a USB device compatible with teensy_loader_cli -r to force the Teensy4 to reboot itself into bootloader.

This allows the board to be reprogrammed without having to press the Reset/Boot button.

A requirement of this crate is that there is no other use for the USB port, as it will fully consume it.

Examples

- examples are intended for the Teensy 4.0, Teensy 4.1 or Teensy MicroMod board -

Prerequisites

The following hardware is required for the examples:

The following software tools have to be installed:

Run

  • Connect the Teensy to PC via USB cable.
  • Press the Reset/Boot button on the Teensy.
  • Run:
    cargo run --release --example teensy4_selfrebootor
  • Run the previous command again. This time the command should not need the Reset/Boot button. The Teensy should switch to boot mode automatically.

teensy4-selfrebootor's People

Contributors

finomnis avatar

Watchers

 avatar  avatar

Forkers

alecrivers

teensy4-selfrebootor's Issues

Device becoming unresponsive after a couple of seconds on Windows

  • Windows 11
  • Reproduced with Teensy Micromod and Teensy 4.0

The error is consistent with the PORT_SUSPEND message I see on Wireshark USB capture, maybe indicating that the board or the attached USB hub may have trouble waking up from a suspend state. I do get some back and forth, though, so I'm not sure what exactly is going on.

I did capture the entire communication on Saleae with USB 1.1 Full-Speed, but my knowledge of USB isn't deep enough to decypher what's going on. I attached the Saleae log, maybe someone else understands what's going on?

Reboots but not to bootloader

Thanks for this useful utility.

Unfortunately when I follow the instructions, I'm not seeing intended / expected behavior. I see Van Ooijen Technische Informatica Teensy Rebootor in lsusb, and I get this far:

$ cargo run --release --example teensy4_selfrebootor
    Finished release [optimized] target(s) in 0.02s
     Running `python3 examples/run.py target/thumbv7em-none-eabihf/release/examples/teensy4_selfrebootor`
Flashing target/thumbv7em-none-eabihf/release/examples/teensy4_selfrebootor ...
Teensy Loader, Command Line, Version 2.2
Read "/tmp/tmpk8p16hp7/firmware.hex": 36952 bytes, 1.8% usage
Hard Reboot performed
Waiting for Teensy device...
 (hint: press the reset button)

But then I must press the button to get the rest:

Found HalfKay Bootloader
Read "/tmp/tmpk8p16hp7/firmware.hex": 36952 bytes, 1.8% usage
Programming.....................................
Booting
Teensy successfully flashed.

Without this firmware I don't even get the Hard Reboot performed line, so something is going right, but I'm not sure what state it's getting into.

This is a Teensy 4.1 if it matters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.