Author Topic: Weird Arduino Due SPI glitches in logic capture  (Read 1340 times)

0 Members and 1 Guest are viewing this topic.

Offline NotionalLabsTopic starter

  • Supporter
  • ****
  • Posts: 23
  • Country: 00
Weird Arduino Due SPI glitches in logic capture
« on: November 19, 2014, 01:37:25 am »
Hey all,

I'm working on a project to reimplement the control protocol for a toy quadcopter using an Arduino Due (Cortex M3) and a SPI-driven 2.4GHz transceiver, but I'm experiencing some odd behaviour from the Due's hardware SPI. I noticed a problem when I was test-flying the quad and it would be fine and stable, then all of a sudden it would go nuts - I performed a logic analyzer trace and found that there appears to be transmission corruption in the 16-byte control packets sent to the Tx.

The SPI glitches seem to take 2 forms:

- Clock glitches where it will just hang high for the duration of the byte transmission:


- Phase glitches where the MOSI transitions seem to be out of sync with the clock (the flagged byte should be \x00, not \x01):


Because the glitches are evident in the traffic from the Due, I don't think it's a problem with the transceiver (an AMIC A7105). I wondered if it could be interference on the bus, but the lack of unexpected logic transitions in the capture makes that seem unlikely. The SPI clock speed is 4MHz (default), which is under the 10MHz limit of the A7105.

I'd really appreciate any advice or troubleshooting tips, I'm at a bit of a loss!

Thanks,

Jim


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf