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

async uart api not working on stm32 with dmamux #32715

Closed
shlomow opened this issue Feb 27, 2021 · 0 comments · Fixed by #32716
Closed

async uart api not working on stm32 with dmamux #32715

shlomow opened this issue Feb 27, 2021 · 0 comments · Fixed by #32716
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@shlomow
Copy link
Contributor

shlomow commented Feb 27, 2021

Describe the bug
When running the tests of the async api of uart on nucleo-l4r5zi we get MPU fault.
The reason is ordering initialization. The uart and dma drivers are initialized PRE_KERNEL_1 while
dmamux is initialized POST_KERNEL. Thus, the function device_get_binding fails since the
dmamux device is not ready to be used. I am not sure since when it is broken.

possible solutions
The immediate solution is to enable the dmamux PRE_KERNEL_1.
A better solution is to extract dma device in compile time and call device_is_ready function in the right places in the code.

@shlomow shlomow added the bug The issue is a bug, or the PR is fixing a bug label Feb 27, 2021
shlomow added a commit to shlomow/zephyr that referenced this issue Feb 27, 2021
When running the tests of the async api of uart
on nucleo-l4r5zi we get MPU fault.
The reason is ordering initialization. The uart and dma
drivers are initialized PRE_KERNEL_1 while dmamux is
initialized POST_KERNEL.
Thus, the function device_get_binding fails since the
dmamux device is not ready to be used.

Fixes: zephyrproject-rtos#32715.

Signed-off-by: Shlomi Vaknin <[email protected]>
@shlomow shlomow changed the title async uart tests not working on stm32 with dmamux async uart api not working on stm32 with dmamux Feb 27, 2021
MaureenHelm pushed a commit that referenced this issue Mar 1, 2021
When running the tests of the async api of uart
on nucleo-l4r5zi we get MPU fault.
The reason is ordering initialization. The uart and dma
drivers are initialized PRE_KERNEL_1 while dmamux is
initialized POST_KERNEL.
Thus, the function device_get_binding fails since the
dmamux device is not ready to be used.

Fixes: #32715.

Signed-off-by: Shlomi Vaknin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant