I'm experiencing this problem with my CC3000:
http://e2e.ti.com/support/wireless_conn ... 20/1031838
It says in the discussions that the IRQ and DataOutput should be pulled up during idle to prevent this.
I see in the docs that I can initialize a GPIO with PullUp enabled. I don't see how to do that with SPI.
It would be VERY nice if the c3000 library had a sleep() and wakeup() function that took care of all this correctly (see my other post http://forum.micropython.org/viewtopic.php?f=6&t=543)
Scott
SPI with PullUp?
-
- Posts: 2
- Joined: Wed Feb 11, 2015 9:57 pm
Re: SPI with PullUp?
Scott, have you tried ? I got the value from running on the appropriate pin (X8 for SPI1 MOSI). I'm not sure if the pull-up and SPI output modes are compatible, but it's worth a try.
M
Code: Select all
pin.init(Pin.AF_PP, pull=Pin.PULL_UP, af=Pin.AF5_SPI1)
Code: Select all
Pin.AF5_SPI1
Code: Select all
pin.p.af_list()
M
Re: SPI with PullUp?
To add to spaceman_spiff's reply-
The IRQ line isn't specifically part of SPI, so the CC3K driver probably configures it as an external interrupt pin. In theory an external interrupt input pin can be initialized with pull-ups or pull-downs enabled. Since the CC3K driver is in C rather than Python you may need to hack the C source to make sure it gets initialized with the pull-up enabled. The Data Output pin, OTOH, is the SPI MISO (master in slave out) and is initialized as an AF (alternate function) pin so you may not have any control over whether pull-ups are enabled.
You can still fix this in hardware by adding pull-up resistors yourself - just connect a large (~10K to ~100K) value resistor from each pin to 3.3V and you have your pull-ups.
At any rate, it seems like a quirk in the CC3000 hardware to require this.
-Bryan
The IRQ line isn't specifically part of SPI, so the CC3K driver probably configures it as an external interrupt pin. In theory an external interrupt input pin can be initialized with pull-ups or pull-downs enabled. Since the CC3K driver is in C rather than Python you may need to hack the C source to make sure it gets initialized with the pull-up enabled. The Data Output pin, OTOH, is the SPI MISO (master in slave out) and is initialized as an AF (alternate function) pin so you may not have any control over whether pull-ups are enabled.
You can still fix this in hardware by adding pull-up resistors yourself - just connect a large (~10K to ~100K) value resistor from each pin to 3.3V and you have your pull-ups.
At any rate, it seems like a quirk in the CC3000 hardware to require this.
-Bryan