2019-04-08 01:14 AM
Hello ,
I am fairly new to microcontroller programming and sorry if this is a noob question. I have a STM32WB55RG board and I want to learn developing a BLE application.
I did an example from STM Workshop (Hands On) and it worked very well. Then i tried configuring CubeMX myself, change the code a bit and still got a good result.
But today, suddenly the BLE stop functioning. I cannot detect the device using any BLE scanner application. At first i thought maybe it got into some error handler eg. HardFault or MemManage. But it dindnt.
I tried debugging using LED and I found out that the code didnt even land on the APP_BLE_Init() function.
So I thought maybe I should re-flash the BLE stack binary. Followed the instructions and using CubeProgrammer CLI, but the device cant be found. Then I tried using CubeProgrammer UI, cant connect to device. I tried with no jumper on BOOT0 and VDD, also connected via ST-Link USB, successfully downloaded the BLE Stack binary on address 0x080CB000.
But still BLE is not active. Anyone maybe experience the same issue or can help me solve this problem?
Thank you very much.
P/s: Sorry for the long post. I thought maybe if I tell the whole story, someone can figure out the solution.
2019-04-10 04:15 AM
Hello,
Did you try to write back an official BLE application ( HeartRate, P2P_Server, transaparent mode,etc...) on the CM4 to check whereas the issue is coming from the secure wireless system (CM0+) or from the main application processor ( CM4) ?
Regards.
2019-04-10 04:50 AM
Hello @Christophe Arnal ,
thank you for the reply.
I did tried the P2P_Server application, but BLE still doesnt functioning.
I think that the code doesnt land on APP_BLE_Init() function because it doesnt receive any instructions from the CM0+. (probably)
I have another microcontroller now, and it works fine. So maybe hardware fault?
Regards.
2019-04-10 05:04 AM
Hello,
I am happy to read that you manage to get another working device.
Your analysis is correct. Either the CM0+ does not answer anymore or something has been broken on the CM4 side that prevents the Transport Layer to report the event from IPCC up to the application.
Would it be possible to check the option byte of the faulty device ?
In fact, I am interested only by the SBRV option byte.
Regards.
2019-04-10 05:17 AM
Hi,
yeah but it did costs hahah.
Here is the option byte page from CubeProgrammer. I didnt change anything from default (i guess).
And maybe one question, i thought that user should treat the CM0+ like a black box. Is it correct?
Thanks.
Regards.
2019-04-10 05:36 AM
Hello,
You are correct, the CM0+ should be considered as a blackbox. I wanted to make sure the option bytes was still correct as you tried to make some CM0+ update.
According to what I can read, the option bytes are correct and the BLE Stack running on CM0+ should be working fine.
The last option byte that may break something is IPCCDBA (user option byte) that should be set to 0 (as long as you are using the delivered BLE application).
As long as the board was working fine with official BLE application and does not work anymore with the same official application, I believe something is wrong with the board or the board settings..
Regards.
2019-04-10 05:48 AM
Hello,
IPCCDBA is set to 0. For your information, the new board have SBRV set to 0x30000. Tried change it on the faulty board, denied.
But yeah, the new board is working so maybe i should not worry about it until it doesnt work (hopefully it stays good).
Thanks for the reply. Really appreciate it.
Have a nice day.
2019-04-10 05:57 AM
Hello,
To complete the information regarding option bytes, there is no way for the user to change any secure option bytes. These are fully controlled by the CM0+ on each update. The SBRV is aligned with the content of the CM0+.
On each CM0+ update, if the new wireless image is getting bigger, the SBRV will be updated accordingly along with the SFSA that reflects the secure flash boundary to secure more flash memory ( giving less memory to the application).
Regards.
2019-04-10 05:59 AM
Hello,
oh i actually didnt know that. Thanks for the information.
Best Regards.
2019-04-17 01:33 AM
Hello ,
I have the same problem. The code didnt land on the APP_BLE_Init() function. Do i add some enable
function manually after stm32cube-MX generated code ? I followed Workshop (Hands On) setting , but the stm32cube-MX didn't have ipcc setting parts. Does this part will effect the M4 and M0 communication?
Thank you.