bicycleguy
Well-known member
This problem started similar to posts about the program loader not responding such as https://forum.pjrc.com/threads/40313-Power-restart-on-Teensy-3-6 and https://forum.pjrc.com/threads/37531-T_3-6-acting-oddly-Program-Button-doing-a-reset-no-bootloader-reprogram but has gotten worse. After much hassle with the program I was trying to debug I wrote this program to narrow the issue.
It loops around saving the I/O values and if any changed since the last loop prints out all the pins monitored:
All the I/O pins are connected to ground like this:
The results I get when holding by the white proto board ends and mildly torquing back and forth look like this:
Pins 26, 27 and 39 occasionally go high and sometimes stay high. I have verified with an oscilloscope that the top pads on the pcb on these pins never glitch so the problem is in
the board or the chip connections, not the proto board connection. Also twisting in the direction of continuity allows the boot loader to run correctly, otherwise I get a reset when pressing either the Arduino upload button or the switch on the board.
No twisting is required if started from cold and waiting.
Looking at the I/O locations on the chip the affected pins are:
The red ones are for sure, the yellow, RESET_b, I''m speculating on since I don't understand the interaction of the MKL chip with the pin.
Hope this technique will help anyone else having problems.
It loops around saving the I/O values and if any changed since the last loop prints out all the pins monitored:
Code:
#define MYVERSION_STUFF "Teensy 3.6 I/O Test 12/3/2016"
void setup() {
Serial.begin(9600);
while( !Serial )
;
Serial.println(MYVERSION_STUFF);
Serial.println("#\tTime\tPins high");
for(int i=0;i<40;i++){
pinMode(i, INPUT_PULLUP);
}
}
void loop() {
static int lastvalue[40];
static int count;
boolean prnt=false;
int temp;
for(int i=0;i<40;i++){
temp=digitalRead(i);
if(temp!=lastvalue[i]){
lastvalue[i]=temp;
prnt=true;
}
}
if(prnt){
Serial.print(count++);Serial.print("\t");
Serial.print(millis());Serial.print("\t");
for(int i=0;i<40;i++){
lastvalue[i]==0 ? Serial.print("_"):Serial.print(i%10);
}
Serial.println();
}
}
All the I/O pins are connected to ground like this:
The results I get when holding by the white proto board ends and mildly torquing back and forth look like this:
Code:
Teensy 3.6 I/O Test 12/3/2016
# Time Pins high(modulo 10)
0 3801 ___________________________7____________
1 3833 ________________________________________
2 3889 ___________________________7____________
3 4043 ___________________________7___________9
4 4043 ___________________________7____________
5 4050 ___________________________7___________9
6 4123 ___________________________7____________
7 4141 ___________________________7___________9
8 4281 __________________________67___________9
9 4283 ___________________________7___________9
10 4284 __________________________67___________9
11 4284 ___________________________7___________9
12 4298 __________________________67___________9
13 4298 ___________________________7___________9
14 4300 __________________________67___________9
15 4316 ___________________________7___________9
16 4336 ___________________________7____________
17 4343 ___________________________7___________9
18 4344 __________________________67___________9
19 4344 ___________________________7___________9
20 4366 ___________________________7____________
21 4372 ________________________________________
22 4375 ___________________________7____________
the board or the chip connections, not the proto board connection. Also twisting in the direction of continuity allows the boot loader to run correctly, otherwise I get a reset when pressing either the Arduino upload button or the switch on the board.
No twisting is required if started from cold and waiting.
Looking at the I/O locations on the chip the affected pins are:
The red ones are for sure, the yellow, RESET_b, I''m speculating on since I don't understand the interaction of the MKL chip with the pin.
Hope this technique will help anyone else having problems.