STM32WB55 support

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
akscram
Posts: 7
Joined: Sat Jan 25, 2020 8:21 pm
Has thanked: 4 times
Been thanked: 4 times

Re: STM32WB55 support

Postby akscram » Sat Jan 25, 2020 8:41 pm

I started adding a basic support for the STM32WBXX family in my branch stm32wbxx on Github. This work is far from ready because right now I am working on a demo for the board and tests. However, I would like to know how these changes can be merged in the ChibiOS mainline, i.e. what's a workflow I should follow including where and how I can publish my code for review and so on. Can you advise me on this matter?

User avatar
Giovanni
Site Admin
Posts: 12748
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 696 times
Been thanked: 573 times
Contact:

Re: STM32WB55 support

Postby Giovanni » Sat Jan 25, 2020 9:29 pm

Hi,

Posting on the forum is OK, make sure to post zip/7z files, everything else is rejected.

Giovanni

yiancar
Posts: 12
Joined: Fri Jan 04, 2019 11:26 am
Has thanked: 1 time

Re: STM32WB55 support

Postby yiancar » Tue Jan 28, 2020 9:29 pm

Hello Giovanni,
Yes it is a separate binary. Sorry for asking so many questions licensing is not my strong point and I hear mixed answers on this.
IE the fact that the header is also under the same non opensource license then if one uses it (so that the rest of the opensource application can access the binary) then thats a big nono. as that api is not open source.

Any idea where I would find more information on this?

User avatar
Giovanni
Site Admin
Posts: 12748
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 696 times
Been thanked: 573 times
Contact:

Re: STM32WB55 support

Postby Giovanni » Tue Jan 28, 2020 9:54 pm

Hi,

I am not sure that the header is not compatible, let me check first. If just the header is required then it could be rewritten.

Giovanni

yiancar
Posts: 12
Joined: Fri Jan 04, 2019 11:26 am
Has thanked: 1 time

Re: STM32WB55 support

Postby yiancar » Tue Jan 28, 2020 9:55 pm

Thank you for checking:)

User avatar
Giovanni
Site Admin
Posts: 12748
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 696 times
Been thanked: 573 times
Contact:

Re: STM32WB55 support

Postby Giovanni » Tue Jan 28, 2020 10:02 pm

Anyway, a lot of that SW is under BSD license, which is compatible, some files are under that Liberty license which is not compatible. I don't understand the mix of the two...

Of all those files, which are required to interface the binary FW? all of them?

Giovanni

akscram
Posts: 7
Joined: Sat Jan 25, 2020 8:21 pm
Has thanked: 4 times
Been thanked: 4 times

Re: STM32WB55 support

Postby akscram » Sat Feb 01, 2020 2:29 am

Hello Giovanni,

I've attached an initial version that supports the STM32WBXX family, particularly speaking CMSIS, HAL and a demo. So, please take a look at the attachment, I hope that you have sometime for review. I've added test results in the archive as well. However, when I'm running tests I'm getting an unhandled exception in `Test Sequence 9 (Objects Factory)` case. The problem is illustrated by the following debug session:

Code: Select all

Thread 2 hit Breakpoint 3, dyn_create_object_pool (name=name@entry=0x8014cc4 "myobj", dlp=dlp@entry=0x20001570 <ch_factory+16>, mp=mp@entry=0x20001574 <ch_factory+20>) at ../../../os/oslib/src/chfactory.c:194
194       strncpy(dep->name, name, CH_CFG_FACTORY_MAX_NAMES_LENGTH);
(gdb) p dep
$12 = (dyn_element_t *) 0x2003ffec
(gdb) p *dep
$13 = {
  next = 0x0,
  refs = 0,
  name = "\000\000\000\000\000\000\000"
}
(gdb) bt full
#0  dyn_create_object_pool (name=name@entry=0x8014cc4 "myobj", dlp=dlp@entry=0x20001570 <ch_factory+16>, mp=mp@entry=0x20001574 <ch_factory+20>) at ../../../os/oslib/src/chfactory.c:194
        dep = 0x2003ffec
        __func__ = "dyn_create_object_pool"
#1  0x08008408 in chFactoryRegisterObject (name=name@entry=0x8014cc4 "myobj", objp=objp@entry=0x200008d8 <myobj>) at ../../../os/oslib/src/chfactory.c:299
        rop = <optimized out>
#2  0x0801062c in oslib_test_009_001_execute () at ../../../test/oslib/source/test/oslib_test_sequence_009.c:113
        myobj = 21930
        rop = 0x0
#3  0x08008c04 in execute_test (tcp=0x8014d54 <oslib_test_009_001>) at ../../../test/lib/ch_test.c:84
No locals.
#4  0x080090a2 in test_execute (stream=0x200013a0 <SD1>, tsp=0x8014064 <oslib_test_suite>) at ../../../test/lib/ch_test.c:308
        tseq = 8
        tcase = 0
#5  0x080113e0 in main () at main.c:89
No locals.
(gdb) f
#0  dyn_create_object_pool (name=name@entry=0x8014cc4 "myobj", dlp=dlp@entry=0x20001570 <ch_factory+16>, mp=mp@entry=0x20001574 <ch_factory+20>) at ../../../os/oslib/src/chfactory.c:194
194       strncpy(dep->name, name, CH_CFG_FACTORY_MAX_NAMES_LENGTH);
(gdb) n
halted: PC: 0x080082be
halted: PC: 0x080082c0
halted: PC: 0x080082c2
halted: PC: 0x080082c4
halted: PC: 0x080082c6
halted: PC: 0x08011c98
^C
Thread 2 received signal SIGINT, Interrupt.
chSysHalt (reason=reason@entry=0x8014eb4 "UNDEFINED IRQ") at ../../../os/rt/src/chsys.c:204
204       while (true) {


The problem appears right at the execution of `strncpy()`. I wonder whether you have any ideas what RCA could be in this case?

Ilya
Attachments
STM32WB55xx-a82cf0.zip
The initial version that support the STM32WBXX family
(279.49 KiB) Downloaded 9 times

User avatar
Giovanni
Site Admin
Posts: 12748
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 696 times
Been thanked: 573 times
Contact:

Re: STM32WB55 support

Postby Giovanni » Sat Feb 01, 2020 8:31 am

Hi,

I don't have a board yet so cannot try, the problem is likely caused by memory allocation in the factory, I would check memory layout in the .ld and .map files.

Giovanni

akscram
Posts: 7
Joined: Sat Jan 25, 2020 8:21 pm
Has thanked: 4 times
Been thanked: 4 times

Re: STM32WB55 support

Postby akscram » Sat Feb 01, 2020 12:38 pm

Giovanni,

Thank you for the clue, I changed the length of .ram0 by setting it to 192k (SRAM1) where I initially set it to 256k including SRAM2(a 32k + b 32k) which now I can see has some special purpose related to CPU2. It seems that it helped and all tests now pass. Please, see the new attachment in this post which has the full set of patches (previous ones and one more with the fix for .ld) including results of test runs.

Ilya.
Attachments
STM32WB55xx-b5dd52.zip
The initial version that support the STM32WBXX family with passing tests
(282.91 KiB) Downloaded 10 times

akscram
Posts: 7
Joined: Sat Jan 25, 2020 8:21 pm
Has thanked: 4 times
Been thanked: 4 times

Re: STM32WB55 support

Postby akscram » Tue Feb 04, 2020 7:59 pm

Giovanni,

I've made several minor fixes for STM32WB55RG and added a board support and a demo for STM32WB55CG USBDongle from the ST Nucleo WB55 kit. Please, take a look at the attachment which includes all previous patches, new ones and also new test results.

Ilya.
Attachments
STM32WB55xx-f99722.zip
Support for the STM32WBXX family including boards and demos for Nucleo WB55 board and USBDongle.
(312.09 KiB) Downloaded 8 times


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 5 guests