2017-05-05 06:43 AM
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-ms2017-05-08 01:04 AM
Hi,
what are the version of BlueNRG expansion board you are using and the BlueNRG FW version currently running?
Regards
2017-05-08 05:30 AM
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
2017-05-08 07:17 AM
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
2017-05-08 02:53 PM
Hi,
Thanks for reply.
I've updated the stack firmware to the 7.2c version (latest) successfully, but the problem continues.
2017-05-09 05:22 AM
Biegelmeyer.Anderson
maybe the flash of your module could be damaged...2017-05-10 05:38 AM
Yes I think so... I will replace this module to verify.
Thanks for reply.
Regards.
2017-05-11 01:41 AM
2017-05-11 09:31 AM
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
2017-05-11 11:33 AM
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.