Hi hope you all are doing good. i'm already done with spidev_test and thats working well, i can send and receive the data. but the problem is when i read the data from arduino uno r3 or Lora (SPI interface module). all receive data is currupted or damaged. i don't know whats going on is it hardware problem or a coding problem.
please share your experience.
here is the Pyhton code:
spi = spidev.SpiDev()
spi.max_speed_hz = 500000
spi.mode = 0b11
resp = spi.readbytes(3) #spi.xfer([0xAA])#readbytes(3)
if (resp != 255):
#print(''.join(["0x%02X " % x for x in resp]).strip())
value = resp + resp
byte1 = bin(resp)[2:].rjust(8,'0')
byte2 = bin(resp)[2:].rjust(8,'0')
byte3 = bin(resp)[2:].rjust(8,'0')
bits = byte1 + byte2 + byte3
and if i use linux spidev_test to read data from arduino i get
FF FF FF 7F FF FF FD FF
FF FF 7F FF FF FE FF FF
FF DF FF FF FF FF FF FF
CF FF FF FF FF FF FF FB
FF FF FF FF FF FF
Hello Syed Bukhari,
My recommendation would be using the Pins Tool for i.MX, which provides a GUI that allows you to see the available muxing options for each module and it also generates the code for the device tree.
You can download it from the link below on the Downloads section:
I hope this helps!