Skip to content
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

make SPI RX/TX dma startup be atomic #42

Merged
merged 1 commit into from
Jun 17, 2022

Conversation

dhalbert
Copy link
Contributor

This is to fix adafruit/circuitpython#6489. When ProtoMatter is in use, it runs an ISR at priority 0 about 1/3 of the time. After an indefinite period of time (could be minutes or an hour), the TX part of SPI would hang, waiting for completion. I believe this was due to ProtoMatter sneaking in between the startup of the RX DMA and the TX DMA. Making the RX/TX startup be atomic seems to have fixed this problem, based on empirical tests running for several hours.

After this is merged, I will PR an update the submodule in circuitpython.

@dhalbert dhalbert requested a review from tannewt June 17, 2022 14:37
@pillilz
Copy link

pillilz commented Jun 29, 2022

Many thanks for this fix. Matrixportal now finally runs rock solid!

flavio-fernandes added a commit to flavio-fernandes/kitchen_clock that referenced this pull request Jul 30, 2022
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>
flavio-fernandes added a commit to flavio-fernandes/kitchen_clock that referenced this pull request Jul 30, 2022
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>
flavio-fernandes added a commit to flavio-fernandes/kitchen_clock that referenced this pull request Jul 30, 2022
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

samd: RGBMatrix causing DMA hangs
3 participants