Go to advanced search

by shinasys
Wed Jul 17, 2019 10:04 am
Forum: Troubleshooting
Topic: [CM3] spidev spi2.0: setup: unsupported mode bits 1
Replies: 0
Views: 330

[CM3] spidev spi2.0: setup: unsupported mode bits 1

I use CM3, and add dtoverlay=spi2-1cs. if i change the spi mode to SPI_MODE_1, meet error... ioctl always return -1. SPI_MODE_0 have no problem, but set SPI_MODE_1 to CPHA(data is clocked in on falling edge). my code is general as following : spi_cs_fd = open("/dev/spidev2.0", O_RDWR); if (spi_cs_fd...
by shinasys
Wed Jul 17, 2019 9:36 am
Forum: Compute Module
Topic: can not change mode to SPI_MODE_1 or SPI_MODE_3 on spidev2.0 of CM3!
Replies: 0
Views: 472

can not change mode to SPI_MODE_1 or SPI_MODE_3 on spidev2.0 of CM3!

Dear Everyone, I must change the SPI mode to SPI_MODE_1 or SPI_MODE_3. If it's mode chage to SPI_MODE_1 /SPI_MODE_3 on spidev2.0 of CM3, returned error. my code is follwing, spi_mode = SPI_MODE_1; status_value = ioctl(spi_cs_fd, SPI_IOC_WR_MODE, &spi_mode); if(status_value < 0) { perror("Could not s...

Go to advanced search