Follow-up question to DMA #18047
-
|
Hello everyone After my last question about DMA I have a follow-up question. When SM and DMA are collecting data, I use "normal" Micropython to do stuff with the data. In this while-loop, I also check, if SM is still active Now and then I loose the input signals for a short or longer periode. If that happens, the checks I do start a second loop, where it's checking a few more times with a delay between each check, if maybe the signal is back. If not, SM and DMA are closed, reset and started again. Now my problem: When simulating this, by switching of the device, that delivers the signal, everything is ok and the checks are done, but when I switch it back on, the code is still not able to detect the signal. If a do a hard-reset, everything works again. What I did so far (tried in different orders): After also trying different code it seems, that there is still something in the DMA-settings, that doesn't get cleared and stays on. My question: Greetings |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
really wants some brackets: |
Beta Was this translation helpful? Give feedback.
-
That doesn't make any sense. 0x4002_0000 is |
Beta Was this translation helpful? Give feedback.
It's important to shut everything down, otherwise the RP2 can be left in an unstable state. My approach is to run the application in a
try...finallybock, ensuring that any exit will shut down cleanly:The
deinitmethod looks like this