New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting trash from SPI on SAMD21G18A (arduino-nano-33-iot) #16247
Comments
@IchiroKuroki |
@dylad |
@IchiroKuroki thanks for your reply. |
FYI, |
@dylad But MISO/MOSI on pins PA16 and PA19 are also available on the board. I extended the configuration as follows: And after that the test gave the expected result with init 0 0 0 0 21. |
Description
When I run the test for sending data through the SPI (tests / periph_spi), garbage is written to the output buffer. If I use -1 for the cs port parameter in this test, then the board hangs. A similar effect is observed if I call spi_init_cs (0, SPI_HWCS (0)); Board - arduino-nano-33-iot(SAMD21G18A)
Steps to reproduce the issue
cd tests/periph_spi
make flash BOARD=arduino-nano-33-iot
make term BOARD=arduino-nano-33-iot
call command init:
init 0 0 0 0 14
call command send:
send TEST_DATA
Expected results
021-03-29 17:05:02,075 # .04-devel-1152-g28e6)
2021-03-29 17:05:02,076 # Manual SPI peripheral driver test (see README.md)
2021-03-29 17:05:02,077 # There are 1 SPI devices configured for your platform.
init 0 0 0 0 14
2021-03-29 17:05:22,318 # init 0 0 0 0 14
2021-03-29 17:05:22,320 # SPI_DEV(0) initialized: mode: 0, clk: 0, cs_port: 0, cs_pin: 14
send TEST_DATA
2021-03-29 17:05:37,597 # send TEST_DATA
2021-03-29 17:05:37,598 # Sent bytes
2021-03-29 17:05:37,599 # 0 1 2 3 4 5 6 7 8
2021-03-29 17:05:37,600 # 0x54 0x45 0x53 0x54 0x5f 0x44 0x41 0x54 0x41
2021-03-29 17:05:37,601 # T E S T _ D A T A
2021-03-29 17:05:37,601 #
2021-03-29 17:05:37,601 # Received bytes
2021-03-29 17:05:37,602 # 0 1 2 3 4 5 6 7 8
2021-03-29 17:05:37,603 # 0x54 0x45 0x53 0x54 0x5f 0x44 0x41 0x54 0x41
2021-03-29 17:05:37,604 # T E S T _ D A T A
Actual results
2021-03-29 17:05:02,075 # .04-devel-1152-g28e6)
2021-03-29 17:05:02,076 # Manual SPI peripheral driver test (see README.md)
2021-03-29 17:05:02,077 # There are 1 SPI devices configured for your platform.
init 0 0 0 0 14
2021-03-29 17:05:22,318 # init 0 0 0 0 14
2021-03-29 17:05:22,320 # SPI_DEV(0) initialized: mode: 0, clk: 0, cs_port: 0, cs_pin: 14
send TEST_DATA
2021-03-29 17:05:37,597 # send TEST_DATA
2021-03-29 17:05:37,598 # Sent bytes
2021-03-29 17:05:37,599 # 0 1 2 3 4 5 6 7 8
2021-03-29 17:05:37,600 # 0x54 0x45 0x53 0x54 0x5f 0x44 0x41 0x54 0x41
2021-03-29 17:05:37,601 # T E S T _ D A T A
2021-03-29 17:05:37,601 #
2021-03-29 17:05:37,601 # Received bytes
2021-03-29 17:05:37,602 # 0 1 2 3 4 5 6 7 8
2021-03-29 17:05:37,603 # 0xb0 0x07 0xcd 0xd4 0xa4 0x76 0x27 0x34 0x4c
2021-03-29 17:05:37,604 # ?? ?? ?? ?? ?? v ' 4 L
Versions
2021.01 and .04-devel-1152-g28e6
The text was updated successfully, but these errors were encountered: