Export to GitHub

the-bus-pirate - issue #66

SPI Mode: MOSI HiZ doesn't work


Posted on Nov 6, 2011 by Massive Bear

When trying to use SPI mode with a 5V system, I found that MOSI does not correctly enter High Impedance mode. Consequently, it hovers at around 3.3V even when I have Vpu set to 5V and pullups enabled. After a quick glance through the source, it looks like a simple typo:

=================================================================== --- SPI.c (revision 602) +++ SPI.c (working copy) @@ -36,7 +36,7 @@ #define SPICS BP_CS

//open drain control registers for OUTPUT pins -#define SPIMOSI_ODC BP_MISO_ODC +#define SPIMOSI_ODC BP_MOSI_ODC #define SPICLK_ODC BP_CLK_ODC #define SPICS_ODC BP_CS_ODC

Running this on my v3a hardware seems to work as expected - with a suitable Vpu, I can get MOSI to around 5 volts.

Status: New

Labels:
Type-Defect Priority-Medium