cancel
Showing results for 
Search instead for 
Did you mean: 

BLE mesh getting unprovisioned state after reset STM32WB

lukasz2
Associate III

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?

3 REPLIES 3
alok
Senior

Hello,

Kindly clarify what exactly has been modified in the code ?

Are you resetting the code immediately after provisioning ?

lukasz2
Associate III

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.

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.