Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SPI mode switch if init fails #4

Merged
merged 2 commits into from Jul 16, 2018
Merged

Add SPI mode switch if init fails #4

merged 2 commits into from Jul 16, 2018

Conversation

jerryneedell
Copy link
Contributor

@jerryneedell jerryneedell commented Jul 13, 2018

If the version test fails after SPI is initialized, try switching to SPI Mode 1 - Change phase to 1.
This what Arduino does to handle the way the device starts up.

Also set default Baud rate to 1Mhz - was 100KHz. That as too low for nrf52 -- not sure why it was set so ow by for default. Arduino uses 1MHz as well

hopefully fixes #3

@jerryneedell jerryneedell changed the title Add SPI mode swich if init fails Add SPI mode switch if init fails Jul 13, 2018
@jerryneedell
Copy link
Contributor Author

I tested this on a feather M4 express, feather m0_express and feather52832

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Thanks!

@tannewt tannewt merged commit 60b73ff into adafruit:master Jul 16, 2018
@jerryneedell jerryneedell deleted the jerryn_fixspi branch July 18, 2018 21:23
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 19, 2018
Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM69 to 1.1.3 from 1.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#8 from jerryneedell/jerryn_fixpylint
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#7 from jerryneedell/jerryn_fix_freq

Updating https://github.com/adafruit/Adafruit_CircuitPython_STMPE610 to 1.0.1 from 0.8.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_STMPE610#5 from jerryneedell/jerryn_fixpylint
  > Merge pull request adafruit/Adafruit_CircuitPython_STMPE610#4 from jerryneedell/jerryn_fixspi
  > Merge pull request adafruit/Adafruit_CircuitPython_STMPE610#2 from adafruit/tannewt-patch-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SPI mode sometimes wrong - CHIP ID check fails
2 participants