-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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: Shell module sample doesn't work on nucleo_l152re #22078
Comments
The integration sample also doesn't work.
|
At f144e39, it also doesn't work. |
@takumiando, I suspect an issue with the clock_control driver. |
yes, this seems to solve the problem on my side. Both 'samples/synchronization' and 'samples/philosophers' work with these settings |
Further testing shows that we're facing the same issue on nucleo_l053r8. |
Please try to turn the board power off and then on just after burning zephyr image. |
@frantony thanks for the hint but this is not how it is supposed to work. |
@erwango, thanks for your idea of workaround! |
@takumiando, I've replaced zephyr code with code from STM32Cube using LL API to set up the clock and faced the same issue. |
A bug under investigation (issue zephyrproject-rtos#22078) limits board operations to 16MHz. When running at 32MHz, some applications may crash. In order to enable use of nucleo_l152re with mot of applications, limit frequency to 16MHz until bug is fixed. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
A bug under investigation (issue #22078) limits board operations to 16MHz. When running at 32MHz, some applications may crash. In order to enable use of nucleo_l152re with mot of applications, limit frequency to 16MHz until bug is fixed. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
These 32MHz faults go away after commenting out WFI instruction in arch_cpu_idle(), so I guess it is some weird kind of interaction between sleep mode and debugging. Looks similar to unanswered question here: https://community.st.com/s/question/0D50X00009XkXgd/stm32l1-hardfault-when-returning-from-wfi-only-when-debugger-attached |
Replacing WFI instruction with CPSID i; WFI; CPSIE i sequence also helps somehow, but I have no idea why it is so. |
Looks like FreeRTOS Cortex-M ports actually mask interrupts before going to sleep (e.g. https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/master/portable/GCC/ARM_CM3/port.c#L476). Maybe that should be discussed with ARM maintainers. |
@ioannisg any opinion on this ? |
@tagunil (FYI @erwango) What is indeed missing here is a __DSB() instruction before calling WFI - I wonder if you can try that an report your findings. |
@stephanosio Yeah, #23511 works, although I still can't understand why. |
@takumiando can you check, now, if this can be closed? #23511 is merged. |
@ioannisg It works correctly on my nucleo_l152re ;) |
@takumiando could you create an issue to get nucleo_l152re working at full speed now? (reverting #22308) |
For me, disable debug-mode by LL is also work fine.
|
Shell module sample doesn't work on nucleo_l152re with latest Zephyr.
Environment
The text was updated successfully, but these errors were encountered: