In Raspberry Pi5 config.txt file,
Enable SPI1 by adding the below line.
dtoverlay=spi1-1cs,cs0_pin=18
After rebooting, Raspberry Pi5 pincrtl functions are changed as below for SPI1 communication.
17: no pd | -- // GPIO17 = none
18: op dh pd | hi // GPIO18 = output
19: a0 pd | lo // GPIO19 = SPI1_MISO
20: a0 pd | lo // GPIO20 = SPI1_MOSI
21: a0 pd | lo // GPIO21 = SPI1_SCLK
Here GPIO18 is used for Chip select0 pin.
I am using spidev module for SPI communication.
Before starts the SPI communication, we need to change Chip select pin as low.
My question is how to low chip select pin0 which is GPIO18?
Enable SPI1 by adding the below line.
dtoverlay=spi1-1cs,cs0_pin=18
After rebooting, Raspberry Pi5 pincrtl functions are changed as below for SPI1 communication.
17: no pd | -- // GPIO17 = none
18: op dh pd | hi // GPIO18 = output
19: a0 pd | lo // GPIO19 = SPI1_MISO
20: a0 pd | lo // GPIO20 = SPI1_MOSI
21: a0 pd | lo // GPIO21 = SPI1_SCLK
Here GPIO18 is used for Chip select0 pin.
I am using spidev module for SPI communication.
Before starts the SPI communication, we need to change Chip select pin as low.
My question is how to low chip select pin0 which is GPIO18?
Statistics: Posted by Fwpriya — Thu Apr 04, 2024 4:57 am