Dear Support,
My thanks to @lucas_a.tx for helping me send data via SPI
Hi @Mehrdad ,
No problem, glad to help!
For more information on how to use spidev_test look here: linux/spidev_test.c at v5.15 · torvalds/linux · GitHub . There are ways to transmit and receive data without altering the code.
For instance, you can change appargs to -D /dev/verdin-spi-cs0 -v -p "1234\xDE\xAD" to send chars ‘1’, ‘2’, ‘3’ and ‘4’ followed by hex bytes 0xDE and 0xAD. The -v option shows the TX buffer.
If you short-circuit the MOSI and MISO pins (loopback) and use the new appargs …
I redo the test after adding gpio.h and connected MOSI to MISO, but no transaction appears. I did the same configuration, but the RX data is dashed.
please see the debuge console and output
output.txt (6.8 KB)
debug console.txt (1.5 KB)
Is there a problem somewhere? Thank you in advance.
Best regards,
Mehrdad
Hi @Mehrdad ,
Looking at the extension configuration options there doesn’t seem to be anything that would stop RX data from being received.
I suggest you check your physical MISO/MOSI connections, and ensure they’re short-circuited.
Compared to your last issue, did you change the code? If so, can you receive data when reverting your changes? How exactly did you add gpiod.h?
Best regards,
Lucas Akira
1 Like
Hi again @lucas_a.tx ,
Using the same jumper wire and SPI test code, I tested and it worked.
Then I added #include <gpiod.h> and determined the bank and line variables, but the RX was still dashed after I removed the gpiod library, bank, and line variables.
I appreciate your time.
I double-checked [It is a new wire jumper, but it is broken]. Now I can see the RX and toggle one output
Best regards,
Mehrdad
Hi @Mehrdad ,
If I understood correctly, SPI is working again, is this right? Glad to help!
Best regards,
Lucas Akira
1 Like