|
buffer_in[i + in_start] = data[i] |
There's a bug on reading SPI bytes. I'm currently writing SPI communication for 6DoF IMU ISM330DHCX to the Adafruit_CircuitPython_LSM6DS on raspberry pi 4B 40 pin. The transfer function returns two entries first one is zero and second is the actual data. I've made some tests with the oscilloscope and my guess is that the first entry is 'measured' while MOSI is writing, the second is the MISO response. Now we are sending the zero as the output. Fixed by transposing the buffer.
buffer_in[i + in_start] = data[i+1]
After that the final buffer consists of 1. registry address 2. registry value
Also on calling I've had to modify the registry address and manually write the first bit high in order to send the reading command. My guess is that the function write_readinto should have it built in.
Adafruit_Blinka/src/adafruit_blinka/microcontroller/generic_linux/spi.py
Line 132 in cf71822
There's a bug on reading SPI bytes. I'm currently writing SPI communication for 6DoF IMU ISM330DHCX to the Adafruit_CircuitPython_LSM6DS on raspberry pi 4B 40 pin. The transfer function returns two entries first one is zero and second is the actual data. I've made some tests with the oscilloscope and my guess is that the first entry is 'measured' while MOSI is writing, the second is the MISO response. Now we are sending the zero as the output. Fixed by transposing the buffer.
buffer_in[i + in_start] = data[i+1]After that the final buffer consists of 1. registry address 2. registry value
Also on calling I've had to modify the registry address and manually write the first bit high in order to send the reading command. My guess is that the function
write_readintoshould have it built in.