-
Notifications
You must be signed in to change notification settings - Fork 141
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
CPU2 crash report during SHCI_C2_BLE_Init(...) #99
Comments
ST Internal Reference: 189569 |
I spent some time yesterday/today and figured out how to dump out the code for CPU2 for these encrypted firmware binaries so that I could properly debug this. This is what I found:
I see 2 bugs as a result:
So follow up questions beyond the 3 bugs noted above:
|
I got some follow-up answers within the community forum that:
|
This is a cross post from the community forum, but I haven't gotten a response there to my bug report yet and since this is crashing within the CPU2 side of things an actual bug report here makes sense. It's incredibly difficult to debug the CPU2 side since the code is delivered as an encrypted blob.
Describe the set-up
Describe the bug
Upon invoking
SHCI_C2_BLE_Init(...)
CPU2 enters a hard fault within the BLE HCI stacksHow To Reproduce
I'm not quite sure what it is from our codebase that causes this yet. I could maybe provide a reduced pre-compiled binary to ST, but I cannot provide the full source code from our proprietary project. It's 100% reproducible with our code running on CPU1, and from what I can tell, the HSEM/IPCC/RCC peripherals are all in the same state as the example projects so I'm currently at a loss as to why this occurs. I've also copied all of the
SHCI_C2_BLE_Init(...)
parameters from some of the newer examples to no avail and validated withgdb
that I had the exact same buffer contents being sent to CPU2 in the shared memory through the mailbox mechanism as the transparent mode example codebase.Within our codebase, I can run v1.11.x through v1.15.0 of the BLE stack and successfully scan for BLE packets. v1.16.x through v1.19.x report a "security attack" upon
SHCI_C2_BLE_Init(...)
invocation, and v1.20.x has a hard fault. These variations in BLE stack behavior are all without changing the CPU1 firmware.Here are the hard fault codes of the various v1.20.x HCI stacks as soon as I invoke
SHCI_C2_BLE_Init(...)
in our codebase:v1.20.0 of stm32wb5x_BLE_HCILayer_fw.bin has a hard fault:
v1.20.0 of stm32wb5x_BLE_HCI_AdvScan_fw.bin has a hard fault:
v1.20.0 of stm32wb5x_BLE_HCILayer_extended_fw.bin has a hard fault:
Please let me know if the PC, SP, and LR inside CPU2 works is sufficient to get an initial fault analysis, or if I need to prepare a minimal pre-compiled binary for CPU1 exhibiting this. I'm still attempting to narrow down what's different between the examples and our codebase - we had integrated the BLE portions of the v1.11.x STM32WBCube codebase quite a while ago but are trying to migrate to the newer version of the BLE stack so we can address the errata around necessitating calling the relatively new
SHCI_C2_SetSystemClock(...)
command.The text was updated successfully, but these errors were encountered: