You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to read the software version from peripheral device as a sanity check upon software startup and faced with very strange issue. I wrote a bare-bone code to check that, and it still has the same issue.
I'm sending a command 0x70 and I expect two bytes of response. Using a logic analyzer I can clearly see the response arrives and values are meaningful. But at the same time what is returned by SPI.transfer() it is zero instead of visible on analyzer values. I look through the library code and found out something like that https://github.com/Seeed-Studio/ArduinoCore-samd/blob/v1.8.4/cores/arduino/SERCOM.cpp#L362
uint8_tSERCOM::transferDataSPI(uint8_t data)
{
sercom->SPI.DATA.bit.DATA = data; // Writing data into Data registerwhile(sercom->SPI.INTFLAG.bit.RXC == 0); // Waiting Complete Receptionreturn sercom->SPI.DATA.bit.DATA; // Reading data
}
I do not have too much knowledge about that, but I assume it shall work properly. But in reality it doesn't.
Hi,
I'm trying to read the software version from peripheral device as a sanity check upon software startup and faced with very strange issue. I wrote a bare-bone code to check that, and it still has the same issue.
I'm sending a command 0x70 and I expect two bytes of response. Using a logic analyzer I can clearly see the response arrives and values are meaningful. But at the same time what is returned by
SPI.transfer()
it is zero instead of visible on analyzer values. I look through the library code and found out something like thathttps://github.com/Seeed-Studio/ArduinoCore-samd/blob/v1.8.4/cores/arduino/SERCOM.cpp#L362
I do not have too much knowledge about that, but I assume it shall work properly. But in reality it doesn't.
Hardware: Seeeduino XAIO SAMD21
Framework version: 1.8.4 installed via Arduino-IDE (GNU/Linux amd64)
The text was updated successfully, but these errors were encountered: