cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble with Bluetooth STM32WB55RG

kazimk
Associate II

Hey everyone, I am using STM32WB55RGV7 processor. At the beginning of my bootloader program

if (((*(__IO uint32_t*)address) & 0x2FFE0000 ) == 0x20000000) // if there is an application at the APP_START_ADDRESS { typedef void(*pFunction)(void);

pFunction Jump_To_Application;

uint32_t jump_address = *(__IO uint32_t*)(address + 4);

Jump_To_Application=(pFunction)jump_address;

__set_PRIMASK(1);
SysTick->CTRL = 0;

__set_MSP(*(__IO uint32_t*) address);

Jump_To_Application();

}

I use the function and so my program jumps to address 0x8050000. When I jump to this program, I start with the commands
__set_PRIMASK(0);
SCB->VTOR = 0x8050000;

and I do not have access to my M0 core after this point. Before using the Bluetooth feature, I was starting the program from address 0x8050000 as I wanted and after that I had no problems. But after jumping, I can't access the shci functions at all and the program crashes. My problem is

https://community.st.com/t5/stm32-mcus-wireless/having-trouble-with-bluetooth/m-p/204476/highlight/true#M8330

matches this topic. I am having the exact same problems.

11 REPLIES 11
STTwo-32
ST Employee

Hello @kazimk and welcome to the ST Community :smiling_face_with_smiling_eyes:.

Have you updated your FUS and stack? If so, have you clicked in the "start wireless stack" button? If so, please share your FUS and stack version (a screenshot from CubeProgrammer will be a good idea) and your option bytes values. Finally, tell me the source of you .bin FUS and Stack files (the version if STM32CubeWB).

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

kazimk_0-1725791226500.png

kazimk_1-1725791415193.png

 

Thank you for your interest. I have a Bluetooth feature that works normally. I upload a new stm32 fw file to address 0x08050000 with remote update on my system and tell my main program to start from here if there is a file here when starting. But after this point, when I try to call functions like APP_BLE_Init, it goes into an infinite loop. I think the starting address of the M0 core does not match and that's why I get an error.

https://community.st.com/t5/stm32-mcus-wireless/issue-in-ble-stack-advertisement-after-jumping-with-bootloader/m-p/63168#M618

 

I seem to have the same problem as the ticket in this link. I tried the solution he suggested and there was no improvement.

 

Could you please update the FUS and STACK, then click on the button "start wireless stack". After that, upload one of our ST examples and test if ot works or not. If you still have the problem, please share the values of the SBRV and SFSA option bytes. Also, read the content of the address 0x5800040c. Finally, read this wiki (specially the FAQ part).

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

kazimk_0-1725794533709.pngkazimk_1-1725794585406.png

kazimk_3-1725794659989.png

I updated Fus and Stack and I click on the button "start wireless stack".

kazimk_4-1725794783005.png

As I said before, I am having trouble because I made the starting address of my M4 kernel 0x8050000. The starting address of my M0 core is probably old so the bluetooth feature cannot start. I have a scenario like this. In my bootloader software, if I receive a broadcast from a bluetooth sensor (bluetooth feature is working), I jump to the 0x8050000 address with my JumpFwApp function. After this jump, after the __set_PRIMASK(0); and SCB->VTOR = 0x8050000; operations, my second software works successfully. However, my bluetooth feature does not work. If I try to run any of the APP_BLE_Init and schi functions, it loops. Because my M0 core does not work.

 

kazimk_5-1725794908459.png

 

 

Could you please do the tests i've requested and provide the informations i've asked for. Also, read the wiki i've shared with you.This should help me to understand the issue.

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you, I looked through the wiki. I thought I gave you the answers you wanted. You just asked me to upload the test programs. Which file would be suitable for such a test? I can try it right away.

Try any example from our ble example on the STM32CubeWB V1.20.0. and perform test. Than send all data that i've asked for on the 3rd comment.

Best Regards.

STTwo-32 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

kazimk
Associate II

kazimk_0-1725798742256.png

kazimk_1-1725798778971.png

 

Sorry, I always have problems building in sample projects. I think we won't be able to find a solution this way. If we can't find a solution other than what you said, thank you anyway. There is just one thing I am curious about. I am making the settings via Keil. It is said on the internet that the starting address of the M0 core can be changed. I couldn't find a way to do this, or it was said that I can change the starting address of the M0 core from the option bytes options. Is there such a method?

 

kazimk_3-1725798964332.png

 

 

 

 

Hello @kazimk 

I'm not an expert in Keil, you may think about askint some support from ARM's forum.

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.