Closed
Description
- Name: STM32WB55VGY
- Link to all relevant information:
https://www.st.com/en/microcontrollers-microprocessors/stm32wb55vg.html
I can see there's a folder in the stm32 core WB55V(C-E-G)(Q-Y)_WB55VYY
but it doesn't show as an in the IDE?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity
federica-ven commentedon Feb 10, 2025
I think I was able to answer everything myself, using the existing information on the wiki.
federica-ven commentedon Feb 11, 2025
I've tried to add support for the STM32WB55VGYx MCUs, generating the ldscript and using a custom clock. I don't believe it's correct but it does compile, but my arduino sketch (Blink.ino) with a GPIO for an LED isn't behaving appropriately.
In my ldscript.ld I've modified the memory area like this
and for the SystemClock, I've imported it from cube, according to all the peripherals I intended to use.
WB55V(C-E-G)(Q-Y)_WB55VYY.zip
fpistm commentedon Feb 12, 2025
Hi @federicaventriglia
did you try to debug to see if clock config is correct.
federica-ven commentedon Feb 12, 2025
Hi @fpistm I've used the same clock config in Cube IDE and it seems to work, I used a simple LED Blink example but it seemed to run.
fpistm commentedon Feb 12, 2025
One issue in the
ldscript.ld
:In the generic clock, pay attention to the lock ressource management, see other WB variant:
As said if you try to debug, you will see if you end in an
Error_Handler()
during the clock config.federica-ven commentedon Feb 12, 2025
Thanks for catching the issue in the ldscript, I've modified it now:
As for the Clock config, I have also tried adding the lock/unlock, as you said I've noticed it from the P-NUCLEO implementation and I see the same behaviour. Not sure if I've used it properly but I'll attach the code as well.
(I've also tried removing the custom clock configuration and using the default one (leaving the systemclock_config method empty) and I still see the same issue happening, which is strange)
Custom Clock with Locks
I'm not too familiar with the debugging process so forgive me I'm not doing it properly. I've added some error statements in the Error_Handler() calls, would that work?
Edit: I've replaced
#error
with#warning
and I do see all 3 of them being printed in the compiled output.federica-ven commentedon Feb 12, 2025
Seems like the same thing is happening with default clock config.
I've also tried modifying the ldscript to
No changes
fpistm commentedon Feb 12, 2025
Should be 0x20000004 not 0x20000008 with -4.
federica-ven commentedon Feb 12, 2025
Yeah, apologies for the typo, looks like this
federica-ven commentedon Feb 12, 2025
Do you think the problem is in the clock configuration? Running the default one could also not work?
variants(wb): add generic WB55V(C-E-G) and WB55VYY
variants(wb): add generic WB55V(C-E-G) and WB55VYY
fpistm commentedon Feb 12, 2025
@federicaventriglia
I've made the PR to support the generic.
It is untested as I do not have hardware with those mcu.
Some notes:
To redefine it to the proper value, create a
build_opt.h
file with for example a LED connected toPA5
:-DLED_BUILTIN=PA5
26 remaining items