Page 4 of 10
Re: STM32WB55 support
Posted: Mon Nov 23, 2020 8:00 pm
by riz94107
OK, I will look closer at the clocks. Thanks!
As far as OpenOCD goes, there does appear to be support added earlier this year (looking through commit emails, I see a few commits that claim adding various features for both STM32WB5x and STM32WB3x), though I will admit I haven't used OpenOCD on this board yet.
Re: STM32WB55 support
Posted: Mon Nov 23, 2020 8:49 pm
by akscram
Hi riz94107,
I didn't test USB, however I have added basic clock initialization for it. I can rebase my changes on top of the latest version of the subversion trunk and verify USB. Please, keep in mind that I'm still working on adding IPCC/HSE support needed for communication with the radio stack running in CPU2.
Hi Giovanni,
OpenOCD 0.10.0 supports STM32WB without enabling `-rtos auto`. I use the following command to attach:
Code: Select all
openocd --search ~/openocd/scripts -f board/st_nucleo_wb55.cfg
However, I noticed that the `-c "stm32wbx.cpu configure -rtos auto"` flag, which provides an ability to see a list of threads, doesn't properly work after the following change:
Code: Select all
svn://svn.code.sf.net/p/chibios/svn/trunk@13496
Which fails with the following:
Code: Select all
Error: ChibiOS registry integrity check failed, double linked list violation
Info : Only showing current execution because of a broken ChibiOS thread registry.
Error: ChibiOS registry integrity check failed, double linked list violation
Info : Only showing current execution because of a broken ChibiOS thread registry.
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000218 msp: 0x20000400
Error: ChibiOS registry integrity check failed, double linked list violation
Info : Only showing current execution because of a broken ChibiOS thread registry.
Best regards,
Ilya.
Re: STM32WB55 support
Posted: Tue Nov 24, 2020 12:44 am
by FXCoder
Hi,
Interesting progress and would be useful for upcoming projects I have.
Could IPCC & HSE become ChibiOS drivers since these are needed for STM32WL as well?
We'll get Giovanni's comments on that...
--
Bob
Re: STM32WB55 support
Posted: Tue Nov 24, 2020 8:33 am
by Giovanni
Those could become helper drivers, like DMAs, for sure but not "abstract" high level drivers in the HAL, too specific.
Giovanni
Re: STM32WB55 support
Posted: Tue Nov 24, 2020 10:59 am
by FXCoder
Giovanni,
Sounds good on the helper driver approach for IPCC and HSE
How about proceeding as follows:
1. Add the latest WB55 work by Ilya to trunk.
2. Then WB standard peripheral work/fixes continue as required in trunk.
3. The iPCC and HSE helper drivers can be started (get implementation clues out of CUBE).
4. WL can be started (not too different to WB) and put into trunk.
I can assist with above as time permits.
--
Bob
Re: STM32WB55 support
Posted: Tue Nov 24, 2020 5:42 pm
by Giovanni
I wanted to do the clock tree like in L5 and G4, this could take a bit of extra work if you start from the code as it is now.
Giovanni
Re: STM32WB55 support
Posted: Tue Nov 24, 2020 8:32 pm
by akscram
Hi Giovanni,
Can you be more specific in what is wrong with `os/hal/ports/STM32/STM32WBxx/hal_lld.h` which I've uploaded in the last tar-ball a while ago?
Best regards,
Ilya.
Re: STM32WB55 support
Posted: Wed Nov 25, 2020 8:36 am
by Giovanni
Hi Ilya,
There is nothing wrong, if you look at the latest G4 and L5 ports you can see that there is a lot less code in hal_lld.h/c because both ports include common parts from LLD/RCCv1. If WB is close enough to L5/G4 then it could do the same thing, if it is different then a RCCv2 may be required.
The idea is to minimize code duplication in clock initialization so all new ports use this new system, it would be strange to introduce a new port and not use it, with time I will rework also some of the old ones.
I will give it a try very soon starting from your code, I have the board already.
Giovanni
Re: STM32WB55 support
Posted: Wed Nov 25, 2020 11:58 pm
by akscram
Hi Giovanni,
Thank you for the details about RCCv1, it makes sense. I've attached the tarball with previous changes rebased on top of the trunk and in addition to that I've update chconfigs for included demos and tests (ADC, RTC and TRNG) which I manually verified.
Best regards,
Ilya.
Re: STM32WB55 support
Posted: Wed Dec 02, 2020 12:31 pm
by Giovanni
Hi,
I merged all the 21

patches with very minor changes, could you validate it works correctly before evaluating changes along the lines of G4/L5?
Giovanni