2020-05-27 02:40 AM
Hello,
This question is the follow-up of this one:
I thought I had fixed it thanks to the GPIO setting but it was just bad luck.
My setup is:
I completely unplugged the MISO wire. On master side I of course still gets the EOT event (as expected) but I expect to get a CRC error since I should receive crappy data , perhaps random or all 0 bytes. But I have no error status in SPI1_SR.
How is it possible that a receive only SPI with CRC enabled detects no CRC error in this case ?
2020-05-27 04:43 AM
Does it receive all zeros?
2020-05-27 04:46 AM
Try it with 10k pullup on MISO
2020-05-27 06:02 AM
Sorry, I tried to delete the post but it seems it doesn't work ? I thought the CRC of a set of 0 bytes was not zero, because I took the wrong CRC configuration. But actually I receive only zeros so the CRC is "correct".
2020-05-27 07:55 AM
Typically depends what the CRC is initialized with. Specific patterns will also clear the register.
If you feed the computed CRC through the check the "remainder" drops out to zero. That's how the SPI checks, it is a CRC==0 of Data+CRC rather than CRC==expected value.