[riot-notifications] [RIOT-OS/RIOT] SPI MISO of SPI0 should be pulled in FRDM-KW41Z (#11460)
notifications at github.com
Wed May 29 12:29:56 CEST 2019
I don't have this hardware to test with, and I haven't personally encountered this with SPI before, but after some consideration it's my opinion that unwanted resets can be fully explained by having MISO floating while the SPI peripheral is powered on.
> Reading the datasheet of the AT45DB041E it stated:
> > The SO pin will be in a high-impedance state whenever the device is deselected (CS is deasserted).
If this is true then a pullup/pulldown is strictly required unless you ensure that CS is asserted all the while that MISO is configured as an input, and otherwise you must expect undefined behavior.
Configuring a floating pin as an input means its CMOS input buffer is free to oscillate, and it will sometimes oscillate fast enough that the two input FETs spend too much time simultaneously turned on which provides a path from VCC to GND which results in anomalous current draw and a subsequent supply voltage brownout or instability. I've had some incredibly enigmatic problems from floating UART inputs so this is something I can't help but pay attention to.
This used to be a less frequent concern, as many SPI slave devices have a weak pullup on their output even in their lowest power state, but lately a lot of devices forego the pull resistor to facilitate modern low-power requirements. A superfluous pullup can easily waste a few microamps or even much more, and that's becoming very relevant these days. When the microcontroller is solely responsible for the pull resistor, as the industry is tending towards, then there's no problem with phantom current draw. But then it's essential that the designer make sure there's a pull resistor enabled or else instead of 3uA extra current draw you get an unreliable board.
The observation that touching the pin fixes the problem is a classic confirmation, despite the fact that it's not a very rigorous test. Even if the resets turn out to be from a totally unrelated problem, floating CMOS inputs still need pull resistors, without exception.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications