Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4833

MicroPython • Re: Ask about Three-wire Serial EEPROM in RP2040

$
0
0
Micropython and C SDK currently include code for Motorola format only (which is mode 0, the default value). You would probably have to access the control register directly to reconfigure it after the provided initialization:

https://github.com/raspberrypi/pico-sdk/blob/2.0.0/src/rp2_common/hardware_spi/include/hardware/spi.h#L255
https://github.com/raspberrypi/pico-sdk/blob/2.0.0/src/rp2040/hardware_structs/include/hardware/structs/spi.h#L32
https://github.com/micropython/micropython/blob/v1.23.0/ports/rp2/machine_spi.c#L191
https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#page=519

Maybe the order parameter (currently unused, i.e. constant value 1, or possibly 0) could be repurposed as some combined frame format/mode/order enum (like FRF = order >> 1)… [It looks like continuous TI format mode could also be useful for S/PDIF.]

Statistics: Posted by PicoTinker — Fri Oct 11, 2024 1:43 am



Viewing all articles
Browse latest Browse all 4833

Trending Articles