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

imx9/px4io: Cleanups #776

Merged
merged 2 commits into from
Sep 30, 2024
Merged

imx9/px4io: Cleanups #776

merged 2 commits into from
Sep 30, 2024

Conversation

jlaitine
Copy link

Stopping tx dma in the short packet receive seems to fix the dma handle corruption issue. I have no idea why.

  • Stop also tx dma in the interrupt / short packet receive
  • No need to clear the uart errors in _stop_dma, errors are cleared in uart irq

@jlaitine
Copy link
Author

Updated the patch to also fix the issue with debugassertion.

The issue was in the end that nxsem_tickwait may also return other values than -ETIMEDOUT and OK. In such case, the DMA would have still be running when the DMA is re-started, causing debugassert in

DEBUGASSERT(dmach != NULL && dmach->state == IMX9_DMA_CONFIGURED);

This is now fixed by checking any possible error from the setup and stopping DMA channels in case of any errors.

- This occurs due to nxsem_tickwait returning also other error values than -ETIMEDOUT. Fix
the issue by treating any error value as a timeout.
- There is no need to clear the uart errors in _stop_dma, errors are cleared in uart irq

Signed-off-by: Jukka Laitinen <[email protected]>
Check the return values from DMA operations and add a performance counter
to detect if there are any DMA related errors.

Signed-off-by: Jukka Laitinen <[email protected]>
Copy link

@pussuw pussuw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlaitine jlaitine merged commit 53daf7c into main Sep 30, 2024
27 checks passed
@jlaitine jlaitine deleted the px4_io_refining branch September 30, 2024 15:54
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.

2 participants