-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
samd: RGBMatrix causing DMA hangs #6489
samd: RGBMatrix causing DMA hangs #6489
Comments
I've done a lot of testing to narrow this down, and also tried some potential fixes or workarounds, none of which have yet succeeded. Display: Priority: Bit depth: Overclocking: no SPI DMA: |
I wonder if there is a DMA status register or memory protection register that can give a clue to what is happening. Are you on USB while doing these tests? USB is also on that same memory bus. |
This update includes important fixes to Matrix Portal lockup: samd: RGBMatrix causing DMA hangs adafruit/circuitpython#6489 make SPI RX/TX dma startup be atomic adafruit/samd-peripherals#42 Signed-off-by: Flavio Fernandes <flavio@flaviof.com>
Update README to include Adafruit's Show-and-Tell recording. This update includes important fixes to Matrix Portal lockup: samd: RGBMatrix causing DMA hangs adafruit/circuitpython#6489 make SPI RX/TX dma startup be atomic adafruit/samd-peripherals#42 Signed-off-by: Flavio Fernandes <flavio@flaviof.com>
Update README to include Adafruit's Show-and-Tell recording. This update includes important fixes to Matrix Portal lockup: samd: RGBMatrix causing DMA hangs adafruit/circuitpython#6489 make SPI RX/TX dma startup be atomic adafruit/samd-peripherals#42 Signed-off-by: Flavio Fernandes <flavio@flaviof.com>
This is a distillation of #6205; thanks to the commenters in that issue. The use of
RGBMatrix
is causing a DMA hang when used in conjunction with ESP32SPI. This line is looping forever:https://github.com/adafruit/samd-peripherals/blob/d3b20192cf94fdea68a412596e082108ba5ebbf0/samd/dma.c#L207
RGBMatrix
uses ProtoMatter, which does significant work to send data to the RGB matrix in an ISR. IfRGBMatrix
is not used, the hang does not happen.Test program:
Server that returns random-length results, for use with the test program above:
In general, within a few hundred fetches, the hang occurs, though the occurrence is otherwise random.
(Note that when
RGBMatrix
is not used, an ESP32SPI web fetch can still fail, due to an interrmittent communication error with the ESP32. However, that does not cause a hang. I will characterize and write up that bug in another issue.)The text was updated successfully, but these errors were encountered: