cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 - BLE Full Stack 1.13.0 breaks RefTable after PIN entry

PHutf.1
Associate II

We are experiencing difficulties with the BLE Full Stack 1.13.0 on our STM32WB55.

Switching from 1.12.1 where the following scenario works flawlessly, 1.13.0 manages to corrupt part of the RefTable that is located in SRAM2 after doing the following:

- Try pairing with invalid PIN "0000" (pairing is rejected, connection is terminated)

- Pair again with valid PIN

Now the ref table is corrupt (see the attached screenshots) and leads to an access in the address space of the CPU where no RAM is mapped to. That crashes in TL_BLE_SendCmd(uint8_t*, uint16_t) when setting the packet type:

((TL_CmdPacket_t*)(TL_RefTable.p_ble_table->pcmd_buffer))->cmdserial.type = TL_BLECMD_PKT_TYPE;

We tried to find out when/where exactly this happens by checking the integrity of the reftable:

(*(uint32_t*)0x20030000 != 0x20030028U || *(uint32_t*)0x20030004 != 0x20030048U)

at the beginning and end of every IRQ handler, and several consecutive checks when the ACI_GAP_PAIRING_COMPLETE event is handled, since we were able to track the memory corruption in close relation to when we receive this event from the BLE stack.

We also disabled write buffering with the DISDEFWBUF bit to make sure that we can observe the source of the memory corruption well, and we noticed that the memory corruption suddenly happens between these "checkpoints" that we put in place, with no influence from any of our code.

5 REPLIES 5
BStic.2
Senior

I am getting the exact same thing, but on v1.12.1. I am sending some writes, I do a pairing and randomly I get the same corruption of the reftable. I cant track it to anything in my code, it seems like CPU2 is causing this write. Did you ever find the issue?

This is what gets written.

0x20030000 1170FD0F 00006E7C 00006CF3 2003F1F0 

Also, the only thing that I can see is correlated to this issue is that it happens when we are using STOP mode for low power. If I just go to regular suspend (WFI), the issue seems to go away.

Remy ISSALYS
ST Employee

Hello,

This issue is known and will be corrected for release v1.14.0.

Best Regards

Thanks a lot! Do you have an ETA for this release?

Remy ISSALYS
ST Employee

Hello,

Release v1.14.0 is planned to summer 2022.

Regards

Remy ISSALYS
ST Employee

Hello,

Issue fixed in patch release v1.13.3 available on ST website.

Best Regards