Skip to main content
eng23
Senior
May 5, 2017
Question

aci_gap_init() returns FLASH_WRITE_FAILED

  • May 5, 2017
  • 4 replies
  • 2090 views
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
    This topic has been closed for replies.

    4 replies

    Andrea Palmieri
    ST Employee
    May 8, 2017
    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

    eng23
    eng23Author
    Senior
    May 8, 2017
    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

    Andrea Palmieri
    ST Employee
    May 8, 2017
    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

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

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

     
    Keith Folske
    Associate II
    May 11, 2017
    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

    Andrea Palmieri
    ST Employee
    May 15, 2017
    Posted on May 15, 2017 at 16:29

    Since the hw version is 0x31, the device is supposed to be a BlueNRG-MS. I wonder if the solution proposed by Keith can be also applied to this case.

    Regards

    Andrea