Hello list, While connecting an as5047d sensor to my Raspberry Pi 3, I noticed something unexpected in the spi connection. According the datasheet, the as5047d works in spi mode 1 (cpol=0, cpha=1). I noticed a difference between `/dev/spidev0.0` and `/dev/spidev1.0`. From the first device, I can read the sensor without problems. When I use the second device, I get the message: > can't set spi mode: Invalid argument I am aware that this can mean that either the Pi’s hardware or the software has a problem with setting the mode. I hope you can help me figure out which one is the case or maybe I am overlooking something. I've put the code I use on a github gist: https://gist.github.com/steviethecat/49cfb90c7aaee848284647d31f4889e1 The argument for the compiled code is the device to use: $ ./as5047d-spi /dev/spidev0.0 | head -n 5 spi mode: 1 bits per word: 8 max speed: 1000000 Hz (1000 KHz) 245.52 245.52 $ ./as5047d-spi /dev/spidev1.0 | head -n 5 can't set spi mode: Invalid argument $ uname -a Linux mypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux I would really like to use `spidev1.0` for the encoder, as I already have the `spidev0.1` device connected to another spi device. Kind regards, Dirk-Jan Faber
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail