-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
stm32: g0b1re: LOG (& probably shell) not functional if both CONFIG_PM
& CONFIG_SHELL
are enabled
#39220
Comments
@erwango ^^ |
@ycsin Thanks for reporting this. About the issue title: "stm32: g0b1re: LOG (& probably shell) won't work if CONFIG_PM=y" About SHELL, per nature, using SHELL with PM requires to be able to wake up the SoC thought UART RX, |
Yes.
I'm aware of the uart wkup isn't supported right now. When the shell works, it should always print |
Then can you rename as :
|
But LOG subsys doesn't work when
See my first "Log" (console) output, the "[00:00:00.005,000] main: Hello World! nucleo_g0b1re" isn't being printed. I've edited the title to: "stm32: g0b1re: LOG (& probably shell) not functional if both CONFIG_PM & CONFIG_SHELL are enabled" |
CONFIG_PM=y
CONFIG_PM
& CONFIG_SHELL
are enabled
CONFIG_PM
& CONFIG_SHELL
are enabledCONFIG_PM
& CONFIG_SHELL
are enabled
Well, I can see "[00:00:00.006,000] main: Hello World! nucleo_g0b1re", and log messages printed every 2 sec. It seems pretty close to me. |
Is that a typo? If not I can change the title to something better? |
:-), typo sorry. This is surely clearer! |
#39128 might be related as well? |
One possibility is that printk and shell uart are competing for UART peripheral. Shell uart backend is using interrupt driven API and printk is using |
@ycsin - were you able to solve the issue? |
@cfriedt I'm not sure if stm32's uart driver support poll_out and interrupt APIs at the same time, but most likely it is not supported, maybe @erwango @ABOSTM @FRASTM can comment on this one? So this is still an open issue, and to be exact I'm not sure what's the cause, maybe just not supported by |
It is. |
I am 99% sure this problem has to do with mixed polling/irq calls. I just pulled latest Zephyr and no logs came out if LOG, SHELL & PM was active. Shell uart backend calls the irq based uart functions, and receives its callbacks fine in the beginning but then as soon as the banner comes ("Booting Zephyr OS...") it stops to receive callbacks. The banner uses polling based uart calls. Disable the banner and it works flawless. I also tracked it down to commit e3f4907 before this commit it worked |
@emillindq, @ycsin Can you check if #39752 is fixing this issue ? |
Unfortunately not, although for one of my builds it does. I suspect it has to do with order of execution and this PR resolves one case of multiple. Once again, disabling CONFIG_BOOT_BANNER with mentioned PR and LOG_XXX messages comes out |
@emillindq, @ycsin New attempt from @jdascenzio: #40173 |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Describe the bug
At least the logging subsys won't work if both
CONFIG_SHELL
andCONFIG_PM
are enabled. Im not sure about shell, since the UART doesn't work when MCU entered STOP mode.To Reproduce
Compile the following on
nucleo_g0b1re
main.c:
prj.conf
LogConsole output, notice that there's also some seemingly garbage data between the "p" and the "rintk!...", they are actually the color code + theuart:~$
from the shell (so shell could be working?):If I compile without
CONFIG_SHELL
,prj.conf
:Log output:
If I compile without
CONFIG_PM
,prj.conf
:Log output:
Impact
Harder to debug without LOG.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: