We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a7f3dbd + 51f7a13 commit 640af0fCopy full SHA for 640af0f
eeprom/spi/SPI.md
@@ -22,9 +22,12 @@ The driver has the following attributes:
22
23
As of Jan 2024 this driver has been updated to fix a bug where the device page
24
size was less than 256. A further aim was to make the driver more generic, with
25
-a better chance of working with other SPI EEPROM chips. The constructor has
+a high chance of working with other SPI EEPROM chips. The constructor has
26
additional optional args to support this.
27
28
+On Pyboard D soft SPI should be used pending resolution of
29
+[this PR](https://github.com/micropython/micropython/pull/13549).
30
+
31
Code samples assume one or more Microchip devices. If using the STM chip the
32
SPI baudrate should be 5MHz and the chip size must be specified to the `EEPROM`
33
constructor, e.g.:
eeprom/spi/eep_spi.py
@@ -24,16 +24,16 @@ def get_eep(stm):
if stm:
if ESP8266:
spi = SoftSPI(baudrate=5_000_000, sck=Pin(4), miso=Pin(0), mosi=Pin(2))
- else: # Pyboard. 1.22.1 hard SPI seems to have a read bug
+ else: # Pyboard. See https://github.com/micropython/micropython/pull/13549
# spi = SPI(2, baudrate=5_000_000)
- spi = SoftSPI(baudrate=5_000_000, sck=Pin('Y6'), miso=Pin('Y7'), mosi=Pin('Y8'))
+ spi = SoftSPI(baudrate=5_000_000, sck=Pin("Y6"), miso=Pin("Y7"), mosi=Pin("Y8"))
eep = EEPROM(spi, cspins, 256)
else:
spi = SoftSPI(baudrate=20_000_000, sck=Pin(4), miso=Pin(0), mosi=Pin(2))
34
35
# spi = SPI(2, baudrate=20_000_000)
36
- spi = SoftSPI(baudrate=20_000_000, sck=Pin('Y6'), miso=Pin('Y7'), mosi=Pin('Y8'))
+ spi = SoftSPI(baudrate=20_000_000, sck=Pin("Y6"), miso=Pin("Y7"), mosi=Pin("Y8"))
37
eep = EEPROM(spi, cspins, 128)
38
print("Instantiated EEPROM")
39
return eep
0 commit comments