New program won't be uploaded on T3.5

Status
Not open for further replies.

pnovo

New member
Yes I know there are many solved issues out there and yes I've googled for a solution, but nothing has really shed any light yet (or provided a solution).

I am using a T3.5 and uploaded a program that contains a blinking routine as a check and was controlling the DAC0 at a constant 1.67 V. Now I want to upload a new program and that won't work. The IDE indicates:

Code:
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.

When I press the reset button, the blinking goes off and the DAC0 to 0 V as expected, but the new program won't still upload even if I hit upload again. If I turn the power off and on again, the board restarts blinking and the DAC0 goes back to 1.67 V.

Both on Windows or on Ubuntu I can find the board after turning it on again, and it disappears when I hit the reset button (this indicates several things, the usb connection is working and the cable is also good).

Does anybody has a good idea about the problem and how to solve it?

If the board would be damaged shouldn't it just stop blinking and/or not be found a USB device by the computer?
 
Since you feel like needing to press the button even twice, one to stop your running code and one to reprogram, it looks to me like your running code is messing up something. What about respecting the forum rule and publishing your code so that others might exactly reproduce your problem?
 
One other point is to check if you are using an official Teensy board as some clones have issues in this respect I think.
 
When I press the reset button, the blinking goes off and the DAC0 to 0 V as expected, but the new program won't still upload even if I hit upload again. If I turn the power off and on again, the board restarts blinking and the DAC0 goes back to 1.67 V.
which means: dont use the button to reset Teensy!!!!
As it is said regularly on this forum, the button on Teensies is a program button. pressing it means teensy waits for a new program to be uploaded.
There is a reset pin on all teensies, but this is NOT connected to any button on original Teensies.
 
Unsure on what you are saying here. Things like:
Both on Windows or on Ubuntu I can find the board after turning it on again, and it disappears when I hit the reset button (this indicates several things, the usb connection is working and the cable is also good).

First there is not a reset button. Although you can rig a reset button that connects the Reset Pin to Ground... Not sure what you mean when you say disappears. If what you are saying is: when I press the program button, there is no longer a Serial port (COMn on windows or /dev/ttyACMx on Unix), then that would be normal as the program puts the Teensy in a different state and does not use Serial protocol to program the board.

What happens if you plug the board in, load up something like blink in Arduino IDE, (configure for T3.5, USB=Serial....), then click the verify button. Then when the Teensy program comes up, you press the program button? If this does not work, what happens if you unplug the board, and plug it back in while holding down the program button?
 
Does anybody has a good idea about the problem and how to solve it?

We can't see your screen, and your description of the problem lacks specific details about what you're really doing and what's happening on your screen, like is Teensy Loader running, does its window change in any way when you press the button, etc. So far, I can't even figure out if you're using Mac, Windows or Linux.

I can tell you Teensy Loader has a hidden Help > Verbose Info window that's meant to give more info. The latest beta version offers greatly improved verbose info, so if you're still having trouble perhaps install the beta to get access to more info.

https://forum.pjrc.com/threads/50254-Teensyduino-1-42-Beta-3

The Verbose Info has a Log menu that lets you save the entire window contents to a file. Then you can attach that file to a message here on this forum. If using the "Quick Reply" editor, click the "Go Advanced" button at the bottom to edit with the advanced editor that lets you attach a file. If you use 1.42-beta3 and show us this log file, odds will be much better we can guess what's wrong.

If the board would be damaged shouldn't it just stop blinking and/or not be found a USB device by the computer?

Usually damage to the hardware completely kills the board. Teensy 3.5 has a much stronger USB connector than the older boards, so damage to just the USB is pretty rare. I'd say the odds are good your hardware is ok. Without details, I can only blind guess, but I'd say it's likely the problem is probably a misunderstanding or some sort of problem on your PC.

Especially ff you're using Windows, make sure you do a full cold reboot before sinking more time into trying stuff.
 
Hi,
Thanks for the answers. Yes there was some info missing and sorry for the long response time.
Here is what you asked (but in short the issue no longer exists as explained below).

Arduino:
Code:
void setup() 
{
  pinMode(13, OUTPUT);

  analogReadResolution(12);
  analogWriteResolution(12); 

  analogWrite(A21, 1.67 * pow(2,12) / 3.3 );

}

inline void blink_LED13()
{
  digitalWrite(13, HIGH);
  delay(1000);
  digitalWrite(13, LOW);
  delay(1000);
}

void loop() 
{
  blink_LED13();
}

Printscreen:
Untitled.jpg

Today when I picked this project again the computer was no longer recognizing that something is plugged to the USB port (although there is still power). Then I used USB ports on the back of the computer and everything is working fine: program uploading automatically and code running correctly. So there must be some issue with the port. Could it be physically damaged or could this be just software based?
Thanks for helping!
 
This could be an old well known Windows problem: Wrong or defective USB device info is cached for an eternity either in the Windows registry or in one of the numerous OemXX.inf files in the windows\inf directory. Manual cleaning up, if you know what you do, is of great help. In some cases, up to Win7, it can help to reboot the computer in safe mode and then in normal mode again to trigger some of the internal windows cleaning services.
 
It might also be that USB port saw overcurrent and disabled it. Shutdown and restart will restore functionality of that port if that is the case.

Toward the note from Thierry ... tapping Program Button too much in succession can also make Windows get confused about the usability of the attached device [ about the time it starts to connect it goes offline and re-appears for programming ] and it may selectively - or by code fault in the PC's USB handling - shut off some functionality as well.
 
So, as quite obvious, the USB port was disabled by Windows. The way I solved the issue was by going to Power Options > Edit Plan Settings (under "Change advanced power settings" on my Win7), locate USB settings > USB selective suspend setting > Setting: Disabled (was Enable by default). After doing this Win7 detected the new device at the affected port (T3.5 was already connected there) and I tested uploading a new sketch which run without problem. Then I re-set the "USB selective suspend setting" back to the default "Enable" and all is running perfectly.

Untitled.png
 
Status
Not open for further replies.
Back
Top