Teensy 4.1 issues with Serial after wiring error

Status
Not open for further replies.

LeoSal99

Member
Hi everyone, this is my first time on this forum. I'm an engineering student with some knowledge of programming, and Arduino related stuff.

I've been using my teensy 4.1 without any problem until I made an error in connecting it to a SPI sensor. I inadvertently shifted all the connections for the SPI0 one pin towards the usb connector :
teensy pin <===> sensor pin (it is an ism330dlc breakout board from Adafruit)
24 <===> I2
3.3V <===> I1
12 <===> VIN
11 <===> DO(miso)
10 <===> SDA(mosi)
9 <===> CS
SCK <===> GND
14 <===> SCK

now i don't know if the sensor works (i'm getting no readings, but i haven't tried it extensively), but i'm getting a weird behaviour from the teensy.
What happens is that I struggle to load any new program to it, sometimes i have to push down the button on the board and press upload on the Arduino IDE several times to make it work (before it worked flawlessly in auto mode) and Serial communication sometimes works and other times it doesn't . The "HelloSerialMonitor" example in examples/teensy/tutorial3 works, but when i load my program i get no output on the serial monitor and get an "Unable to open COM3 for reboot request. Windows Error Info: Accesso negato." error from the ide. The same exact program on my teensy 3.5 prints a list of zeros on the serial monitor ( the sensor reading doesn't work but a list the serial communication does).

I've already tried pressing the onboard button for 15 seconds and it restored the basic blink sketch, then it let me upload a program without needing the press of the button and then stopped working again.

Any ideas on how to solve this mess i made?

Thanks, Leonardo

Also please bear with my english, I'm not a native speaker
 
Hi Leonardo, have you tested it without the sensor attached? If the sensor is damaged, that may cause the issues you see.

Len
 
Hi Len, thanks for your input.
As you suggested I tested some examples and my own program with the sensor disconnected and had the same issues as before.
After some thinkering I think i found the issue: I was calling the Serial.begin() function after noInterrupts() and it was messing the teensy 4.1 ability to communicate via Usb, for some strange reason my teensy 3.5 wasn't showing the same problem and this threw me off.
Now I'm getting the same behaviour from both my teensys, I can't still manage to communicate with the sensor but at least it appears I haven't made any damage to my boards.
I'll have to do some more tests, but the main issue is now resolved.

EDIT: now even the sensor works, it is just my programming that is broken :)
 
Status
Not open for further replies.
Back
Top