0x90 / the-bus-pirate

Automatically exported from code.google.com/p/the-bus-pirate
Other
5 stars 7 forks source link

SPI Mode: MOSI HiZ doesn't work #66

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by mich...@procter.org.uk on 6 Nov 2011 at 1:51