Multiple SPI devices cause code to jump into the weeds

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Multiple SPI devices cause code to jump into the weeds

Post by TomHumbleAndHandsome »

Ok, that kind of reading is something I need to do in the morning after 7 or 8 cups of coffee, not Christmas Eve!

But ya, this looks like what I need to do. I counted pins and I don't have the option of using the 8 bit data mode for the TFT and the "soft" SPI port is excellent as a debugging tool but it's slowness is a little annoying, especially if you're trying to coordinate with a touch screen.

I've never looked at SERCOM stuff before. First read was confusing but I should be able to figure it out after reading over it a few times. Did Limor write this document? My wife was a tech writer, I used to proof her stuff. It's pretty good! I'm looking forward to reading it again... and again... and again

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Multiple SPI devices cause code to jump into the weeds

Post by TomHumbleAndHandsome »

Ok, it took a lot of coffee to get through that to the example at the end. I've got a plan, and code that compiles; now I have to make a board and try it out. But since the SoftSPI worked, I'm confident this will. I'll let you know.

BTW, I wasn't aware that there were libraries located under AppData until I started going through this example and asking questions. I discovered "wiring_private.h" in ...AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.7.5\cores\arduino

Is there some place that this stuff is documented? Did I miss school that day?

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Multiple SPI devices cause code to jump into the weeds

Post by adafruit2 »

its mostly known to devs only - thats where the board support packages live

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Multiple SPI devices cause code to jump into the weeds

Post by TomHumbleAndHandsome »

There's nothing harder than trying to debug ONE issue when you actually have MULTIPLE issues.

Well it's official - I have a STATIC ELECTRICITY problem. The radio head library could be responsible for additional grief but I most definitely am getting the TFT screen to "white out" on me as well as the itsy rebooting, even WITHOUT the radio.
And it all happens when there's activity in the room, mostly when I stand up from my chair.

I'm using a grounded mat and wrist strap. I've rebuilt the board twice using new components each time and I've added a second SPI dedicated to the TFT. I learned a lot but I still have this issue so I think I'll just put the board into a PLA enclosure and start using it as my weather station. I'll just have to reboot it once in a while when the humidity is low.

Tell me, is the TFT screen screen particularly susceptible to ESD?
My other projects never had static problems and this is my first project with a TFT screen.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Multiple SPI devices cause code to jump into the weeds

Post by adafruit2 »

could be pins not connected well, or floating? but yeah its staticy out :)

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Multiple SPI devices cause code to jump into the weeds

Post by TomHumbleAndHandsome »

I would suspect my pin connections but after 3 boards, two of which were soldered, one was wire wrapped but all displaying the same symptoms, I can't say my connections were all bad in the same way. Static is the only thing I can think of.

I have two boards running continuous testing now. One with just a radio and one with just a TFT. It's the one with the TFT that has consistent failures. That's why I asked, is the TFT particularly sensitive to static electricity?

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Multiple SPI devices cause code to jump into the weeds

Post by TomHumbleAndHandsome »

Not sure if anyone is reading this anymore but I just wanted to add that after reading about the triboelectric effect and looking up materials that generate static, I saw that "clear polycarbonate" is near the top of the list. That's what my nice giant floor mat is made of that I installed in my office a month back. It's great for rolling around on but apparently I'm a human Vander Graff Generator.
Apparently there's a static electricity issue...
Apparently there's a static electricity issue...
Static Kitty.png (299.83 KiB) Viewed 116 times

User avatar
TomHumbleAndHandsome
 
Posts: 99
Joined: Mon Feb 15, 2021 6:38 pm

Re: Multiple SPI devices cause code to jump into the weeds

Post by TomHumbleAndHandsome »

Since I wrote last, I tried to use the touch screen which is separate hardware from the TFT display. Unfortunately it also has issues that appear to be static related. Using only the code provided by the library examples, the "getPoint" function often returns a "z" value indicating that it's being touched when there's nothing touching the screen.

I've purchased three of these 2.8" TFT displays and they all work the same. If it was just one, I'd say I had a bad one and move on but I suspect there's something adafruit needs to do to harden these breakout boards for static electricity.

I have many other sensors and devices that I'm using with no issues at all. None. There's something wrong with the breakout boards.

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”