-
Notifications
You must be signed in to change notification settings - Fork 7.5k
UART_INTERRUPT_DRIVEN broken on SOC_SERIES_IMX7_M4 and SOC_SERIES_IMX_6X_M4 #11465
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
Comments
Some additional information. When compiling with CONFIG_UART_INTERRUPT_DRIVEN=y the UART_SetIntCmd appears this way in the zephyr.lst (attached) file:
As far as I understand the UART_SetIntCmd is calling the UART_SetDmaCmd and it shouldn't. I don't have any idea how to investigate this. Is this a compiler/liker issue? The function declaration and protopyte looks ok to me. |
Hi @diegosueiro, I have verified that the UDOO Neo has the same problem on master while not having it on 1.13. As for the UART_SetIntCmd() and UART_SetDmaCmd, the functions looks the same except for the name of one parameter. So compiler probably optimized it this way and it should be ok. |
@diegosueiro : Thanks for ticketing this issue. |
Do you want to say that running with shell enabled, your board is effectively locked up, always spinning in calls to ISR? |
@diegosueiro : Can you try |
Yep. |
This is the output for the console echo sample app when I type one key (to send one character in the uart to the board):
Running the addr2line didn't help:
|
@stanislav-poboril , I used the step-by-step execution with j-link and it went through the UART_SetDmaCmd function. |
@diegosueiro Yes and I think it is OK. The two functions are identical, so it is enough to branch the execution from |
@pfalcon and @stanislav-poboril , I don't have enough time to investigate this issue at the moment because I'm in the middle of another work for Zephyr. It should be great if one of you could help to look at this in the UDOO Neo board. |
@diegosueiro: Same stuff here. (All the time, but lately even worse than usual ;-) ). At the least, I need to finish with MPS2 issue before looking into something else. But we'll get to it - ticket is here, so it won't be lost. Note that I don't any device with that, so my review will be only speculative. |
@diegosueiro , @pfalcon , I can investigate it on UDOO Neo board once I will get to it. |
@pfalcon and @stanislav-poboril , I found the issue with the console echo sample app:
Later I'll test on the shell module sample app. |
Oh damn, my fault. Thanks for investigating it! |
This patch fixes the uart isr calling the callback with wrong data (zephyrproject-rtos#11465) and the uart_poll_in checking the wrong status flag. Signed-off-by: Diego Sueiro <[email protected]>
This patch fixes the uart isr calling the callback with wrong data (#11465) and the uart_poll_in checking the wrong status flag. Signed-off-by: Diego Sueiro <[email protected]>
@diegosueiro : You're the author of this bugreport, you would be among first to know if it should be closed or not. If you'd have added:
To the commit message of #11778, it would be closed automatically, and that's recommended practice, as we have really high ticket flow indeed to track/perform manual closures. |
Thanks Paul. I'll close it manually. |
Shell module sample app was working without any issues on v.1.13 and after testing it on master no characters are not shown in the console.
After bisecting it I found that the issue came up with the 4962618 commit.
Using the debugger I could track that the uart_imx_isr is always called even if there is no received or data to transmit.
Disabling the CONFIG_UART_INTERRUPT_DRIVEN the shell prints the prompt but it doesn't process the user entry. The sys_dlist_get is always returning NULL when called from _impl_k_poll_signal_raise which was called from shell_transport_evt_handler.
Because of memory limitations I'm using the prj_minimal.conf:
cmake -DBOARD=colibri_imx7d_m4 -DCONF_FILE=prj_minimal.conf ..
@stanislav-poboril, is it possible to test this in the UDOO Neo since it uses the same uart driver?
Is issue is possibly related to #11281, #11202 #8869.
The text was updated successfully, but these errors were encountered: