MaixPy-v1_scripts icon indicating copy to clipboard operation
MaixPy-v1_scripts copied to clipboard

network_wiznet5k.py SPI id

Open jay6621 opened this issue 4 years ago • 3 comments

The link https://maixpy.sipeed.com/en/libs/machine/spi.html#parameters clearly states that 'id' for SPI allowed is 0 to 3 but example here under Network folder - network_wiznet5k.py has id: 4 , How? what is the right data ? I would love to help writing or developing Ethernet support for Maix Dock. Any Help is appreciated.

jay6621 avatar Mar 24 '21 05:03 jay6621

4 is the same as SPI.SPI_SOFT

H3adcra5h avatar Mar 26 '21 15:03 H3adcra5h

So, it is using software SPI ? How about using hardware SPI ? I couldn't find any pinout diagram for Maix Dock.

jay6621 avatar Mar 27 '21 18:03 jay6621

The documentation isn't so clear on this side. You have 4 hw SPI devices. SPI2 can only work in slave mode, but I read somewhere. maybe in the documentation, that the slave mode isn't implemented. SPI3 is reserved the the flash. SPI0 is the lcd, I think and SPI1 is the SD card, but also not sure. If I use SPI1 the SD card isn't available.

So there is no free hw SPI device for the network. Some interesting material can be found here.

H3adcra5h avatar Mar 28 '21 12:03 H3adcra5h