cancel
Showing results for 
Search instead for 
Did you mean: 

aci_gap_init() returns FLASH_WRITE_FAILED

eng23
Senior
Posted on May 05, 2017 at 15:43

Hi all,

I am implementing the X-CUBE-BLE1 stack in my project and after some initializations like:

aci_hal_write_config_data(CONFIG_DATA_PUBADDR_OFFSET,

                                  CONFIG_DATA_PUBADDR_LEN,

                                  bdaddr);

aci_gatt_init()

The function aci_gap_init_IDB05A1(GAP_PERIPHERAL_ROLE_IDB05A1, 0, 0x07, &service_handle, &dev_name_char_handle, &appearance_char_handle);

returns the status FLASH_WRITE_FAILED (0x4A).

Have anyone any idea for this problem?

I'm following the 'SensorDemo' project step by step.

Thanks.

#spbtle-rf #stm32 #bluenrg-ms
10 REPLIES 10
Andrea Palmieri
ST Employee
Posted on May 08, 2017 at 10:04

Hi,

what are the version of BlueNRG expansion board you are using and the BlueNRG FW version currently running?

Regards

Posted on May 08, 2017 at 12:30

Hi,

Thanks for reply. The BlueNRG firmware version is 1813. The hw version is 0x31.

In fact I'm not using BlueNRG expansion board, I'm using the BlueNRG module directly in my PCB prototype. I've tried to use the STSW-BLUENRG-DK too that uses the function aci_gap_init(), but it returns the same error.

Best Regards

Posted on May 08, 2017 at 14:17

Biegelmeyer.Anderson

‌ for some reason, the flash memory of your device has been corrupted. You should try to restore the FW before runyour application.

Kind regards

Posted on May 08, 2017 at 21:53

Hi,

Thanks for reply.

I've updated the stack firmware to the 7.2c version (latest) successfully, but the problem continues.

Posted on May 09, 2017 at 12:22

Biegelmeyer.Anderson

‌ maybe the flash of your module could be damaged...

Posted on May 10, 2017 at 12:38

Yes I think so... I will replace this module to verify.

Thanks for reply.

Regards.

Andrea Palmieri
ST Employee
Posted on May 11, 2017 at 10:41

https://community.st.com/0D50X00009bMM5DSAW

 
Keith Folske
Associate II
Posted on May 11, 2017 at 18:31

I had this very same thing happen to me last week.  Here is what happened and how I fixed it.

The BlueNRG-1 uses flash as NVMEM starting at address 0x10067800.  For some reason, your application or some interaction with the board has corrupted this area of memory and the stack can no longer write to this area.

To fix it, download the latest BlueNRG ST-Link utility.  It is important to note that the regular ST-Link utility will not work.

Once downloaded, connect to the radio via jtag and do a full chip erase.

Now re-program the radio with your application.  It should boot just fine.

As a post mortem, you may want to retrace your steps in an attempt to figure out how the flash was corrupted.

Best of Luck,

Keith

Posted on May 11, 2017 at 18:33

No, don't replace the device.  The flash is not damaged.  The flash has just been corrupted and is easily fixed.  See my solution below.