Skip to main content
lukasz2
Associate III
January 31, 2020
Question

BLE mesh getting unprovisioned state after reset STM32WB

  • January 31, 2020
  • 2 replies
  • 816 views

Hi,

I am working with BLE_MeshLightingDemo. I have a problem with provisioning because device getting unprovisioned state after reset.

It is strange because if I flash example BLE_MeshLIghtingDemo without modifying it everything works well. And next if I flash code "BLE_MeshLIghtingDemo+my added code" it works well too.

Problem appears when my own program is flashed on the clear STM32WB, provisioning process is success but after reset the device getting unprovisioned state.

What I determined is that at 0x0807e000 and 0x0807f000 provisioning data is stored.

Those pages are clear and that is why after reset device getting unprovisioned state.

But my code does not touch those pages.

What can be the reason of this strange behavior?

This topic has been closed for replies.

2 replies

alok
Visitor II
February 10, 2020

Hello,

Kindly clarify what exactly has been modified in the code ?

Are you resetting the code immediately after provisioning ?

lukasz2
lukasz2Author
Associate III
February 18, 2020

For the provisioning process to success I made the trick not to register my task and not to initialize any additional hardware.

In my init function function I just made a return if at the addresses 0x0807E000 and 0x0807F000 are 0xFF values.

But this does not help too. Sometimes provisioning data is stored but sometimes not.

Can you suggest any checklist or steps to discover the problem.

lukasz2
lukasz2Author
Associate III
February 10, 2020

Hi,

I can't show my code, but I will try to clarify the changes. The first change is to register a new task in int main( void ) just before while (1) {}:

/* Register the task for all app usr dedicated processes */
 UTIL_SEQ_RegTask( 1 << CFG_TASK_APP_USR_ID, UTIL_SEQ_RFU, AppUsr_Process );
 /* Set the task in the scheduler for the next scheduling */
 UTIL_SEQ_SetTask( 1 << CFG_TASK_APP_USR_ID, CFG_SCH_PRIO_0);

From the pheripherals viewpoint I use these:

  1. UART - getting & decoding GPS NMEA strings
  2. two timers & EXTI - coding & decoding DALI communication

I am resetting the code manually after a few seconds or minutes after provisioning.

If you will need to know more about my code feel free to ask.