Skip to main content
Associate II
September 8, 2024
Question

Having trouble with Bluetooth STM32WB55RG

  • September 8, 2024
  • 2 replies
  • 2405 views

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.

2 replies

STTwo-32
Technical Moderator
September 8, 2024

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 

kazimkAuthor
Associate II
September 8, 2024

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.

 

STTwo-32
Technical Moderator
September 8, 2024

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 

kazimkAuthor
Associate II
September 8, 2024

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

 

 

 

 

STTwo-32
Technical Moderator
September 8, 2024

Hello @kazimk 

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

Best Regards.

STTwo-32 

kazimkAuthor
Associate II
September 8, 2024

kazimk_0-1725804269512.png

https://www.st.com/resource/en/application_note/an5289-how-to-build-wireless-applications-with-stm32wb-mcus-stmicroelectronics.pdf

 

First of all, thank you very much for your help. I will check. I want to ask you for one last help. I understand that Application Note clearly tells the point where there is an error. I am not sure if I understand correctly. When I do what is explained, I am missing something and I cannot get a positive result.