-
-
Notifications
You must be signed in to change notification settings - Fork 40.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teensy / Bootloader/Reset (via Shift + Shift + Pause) doesn't put the teensy in boot mode. #532
Comments
I reflashed the Teensy after a hardware reset and now the Shift + Shift + Pause is working ok. |
Setting up a short on the teensy GND / RST that I can trigger easily without opening the case seems like a reasonable long term solution. |
@jackhumbert are there options for software based reset? |
@jackhumbert one other related question, why does the regular keyboard firmware kick in after 3 or so seconds? Makes me think it's not really going to the bootloader. |
@jasonm23 What kind of options are you looking for? You can put RESET on your keymap and the sky is basically the limit. I have mine bound to Fn + Backspace. |
Hi @TerryMathews I'm basically looking to have keyboard based access to the bootloader. Shift - Shift - Pause is unreliable, and often necessitates opening up the case. (Sorry if I didn't explain that.) If mapping RESET on the keymap is possible, and that's identical in operation to pressing the hw button on the teensy, I think I'll be set. |
Look at the keymap in Phantom for an example of what RESET looks like. On Jul 25, 2016 12:22 AM, "JasonM23" [email protected] wrote:
|
Thanks for the tip!
|
The code / pre tags make a big difference in read/cognition (read: certainty) for me. |
@TerryMathews - so I mapped up This isn't what happens when doing a HW reset and that's what I'm really after. Is it possible? Am I doing something else wrong? Really at a loss to understand if (a) I have unreasonable expectations of what software reset can/should do. (b) I'm missing some info (c) ??? |
You have something wrong in your source then. Reset should be taking you to Which, by the way, what device are you working on and can you upload the On Jul 25, 2016 2:21 AM, "JasonM23" [email protected] wrote:
|
The Teensy code in Phantom uses 4096 for bootloader size, and I can vouch On Jul 25, 2016 10:58 AM, "JasonM23" [email protected] wrote:
|
@TerryMathews really? The bootloader size for the Teensy 2.0 should be |
Phantom drops reliably into Bootloader using 4096. I have to take my I built the Phantom code from Satan, so the bootloader jump carried over as I can't explain why it works, but it works on both Teensy 2.0s I have. On Jul 25, 2016 11:16 AM, "Jack Humbert" [email protected] wrote:
|
@TerryMathews @jackhumbert the Teensy is indeed a 512kb memory (I assume that includes the actual bootloader itself.) Regardless: (reflashing via hardware reset - SW reset not working.)
Even though my firmware is only ~23Kb it's reported as 71%. If I compile the Phantom firmware (let's do that now...) And load it onto the teensy...
it's also close to 24kb so maybe that clears up the numbers. |
After recompiling my handwired tenkeyless firmware both the The difference is that I'm at another location and using a different Mac (from the machine I was using when I opened the issue). I'll experiment and see if I can make it fail again. (without changing machines) Edit: For reference: failing machine is an iMac (2015) and the machine I'm using now is a MBPRetina 13" early 2015. Note: as above, the SW reset wasn't working until reflashing on the MBPRetina. I'm also going to change the vendor id / product id so that the mac sees it as a new board, just to see if the USB host has any issues. (A wild stab in the dark TBH, but not much else to do right now.) Done, no effect, SW reset is working. I'll hook it back up to the iMac tomorrow and see if I can get the fault to repeat. Worst case, at least I'll have narrowed down to the iMac. (BTW there are multiple iMacs at the other site and I've had this experience with at least 2 of them.) |
BTW @TerryMathews I'm not sure why your Makefile / bootloader size is working at 4096, mine's unchanged as 512 for the teensy. No idea why yours is working, because it shouldn't! |
Tested with both sizes. Makes zero difference. SW reset continues to work. (still on the MBPRet) |
Ah well, it's not a specific Mac. I un-plugged the board and reconnected it and SW I'm going to try connecting to another host machine now and see how it goes. |
Connected to a much older Macbookpro early 2011. SW Reset not working. Can remedy only with HW reset. Annoying. :( |
I know why the bootloader size works - learned a ton about ATmega32u4 last night trying to fix a clone Pro Micro. The bootloader address jump isn't controlled by the software the controller is running, it's controlled by software fuses. Setting the bootloader size bigger than needed shortchanges the availabile program size but ensures maximum comparability. To your issue, I wonder if your Mac devices that aren't handling soft reset correctly are dropping power to the USB port when the device resets. Do you have a powered USB hub you can use in between the device and the Mac to test? |
Hi @TerryMathews after flashing, up until disconnection, the SW reset feature works. As soon as I disconnect USB or power down the host, SW reset no longer works and a HW reset is required. No changes on the hardware end affect this. (all Macs; powered/unpowered USB hubs etc.) |
I cannot explain that. That has not been my experience on three Teensy 2.0 based keyboards - 2 Phantoms and a Neutrino. Do you have a powered USB hub you can try in the middle? I think at this point we've narrowed it down to either the Teensy itself or the behavior of the Macs you have it connected to. |
@TerryMathews I have found the answer to this issue, and it turns out to be The Teensy 2.0s that I have been using are apparently clone devices Notable differences are gold contacts on the pads/through holes and an These were sold on eBay as Teensy 2.0 and come in a solid plastic They seem to work exactly as a Teensy 2.0 except for this particular Hopefully this information will prove useful to someone in the future. |
For reference https://www.pjrc.com/teensy/counterfeit.html |
Glad to hear it. Since you've isolated the issue and determined that it's not related to QMK you should close this and the other issue you have open. I'd be curious to know if there's something fundamentally flawed in the hardware on that clone or if it's just a bad implementation of the Teensy bootloader. Would you be willing to pass it on to me for shipping cost? I've got the hardware to flash a different bootloader on via ISP and see if it behaves any better. |
I have a few of them, so I'd be happy to send one to you. ping me via my username at Google's popular email system. |
BTW verified - Teensy genuine the bootloader size set to 2048 works. 512, 1024, 4096 do not work. All tested. AMtel bootloader and the LUFA bootloader: 4096 |
Hi @jasonm23 , I built my first neutrino this week end and I have the same issue for reset of the teensy.. I came here to understand that I dont have a copy of teensy 2.0 :( |
You can make the clone Teensy work reliably if you reflash the bootloader. On Oct 9, 2016 2:35 PM, "Yoobe" [email protected] wrote:
|
I have a JLINK and a ST-link.. don't think they are compatible with AVR boards :( |
Maybe I could use an arduino board as ISP I have a Arduino Nano V3.0 and based on this website (https://www.arduino.cc/en/Tutorial/ArduinoISP) I can try to flash the boatloader.. Yes I am interested by the bootloader you have |
Yoobe the amtel bootloader is fine, you can get it from their site. http://www.atmel.com/devices/atmega32u4.aspx?tab=documents Sent from my iPhone |
Yoobe, what's your e-mail? I can send you what I sent to JasonM23 that he On Sun, Oct 9, 2016 at 3:03 PM, Yoobe [email protected] wrote:
|
Terry did you modify it? Yoobe should just download it from amtel.
|
Btw, thanks for letting me know you got the teensy clone in the mail.
|
It's not from Atmel, it's from http://www.stanleylio.com/home/usblufa And yes it is modified, because as-is it wasn't reliably soft resetting Finally, no I didn't receive the clone you mailed me. I didn't think it was On Oct 9, 2016 10:34 PM, "Jason Milkins" [email protected] wrote:
|
here is my email: [email protected] Based on your work, do you know if there is a chance to change the firmware code to have the reset working as expected? Matter of address? |
I am having this same problem with a "Teensy 2.0" bought from AliExpress. If I perform a hardware reset then I am able to perform software resets until I unplug. On replugging, software resets no longer jump successfully to the bootloader - it seems that the firmware does get restarted though even though it doesn't jump to the bootloader. Using the magic bootloader command on powerup ( |
@TerryMathews Sorry for the late reply. It was sent tracked and according to the carrier it was delivered / received. I wonder what happened to it !? |
@stefanadelbert as you'll read above these Teensy's from AliExpress are not the real deal, so you need to reprogram them with a USB-ISP programmer. They look something like this. Just google for 'usb isp programmer' and you will get a bunch of options to buy one. They are cheap, often less than $10. You can then re-flash the bootloader as per Terry's instructions and my notes above. |
@TerryMathews Thanks for the reply - I really appreciate it. I ended up drilling a hole in the bottom of my keyboard so that I could access the reset pushbutton on the "Teensy". It's a shame, but it works. Next time around I will get myself the real thing instead of the knockoff. |
NOTE: using a BOOTSIZE of 4096 with these teensy clones allows soft reset using LShift + RShift + Pause |
I've found that the doing Shift + Shift + Pause isn't putting the teensy 2.0 into bootloader / flashing mode properly. TMK worked fine.
I've looked at #164 and ensured the USB is unplugged/plugged in again to ensure this isn't the cause.
Teensy CLI and the GUI both fail to see it in bootloader mode.
As a side note the keyboard simply begins registering key strokes again in a few seconds after doing Shift + Shift + Pause
The text was updated successfully, but these errors were encountered: