This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Ble mesh and flashwrite together not working

Hello Everyone,

I am using the example  ...\nrf5_SDK_for_Mesh_v2.2.0_src\examples\light_switch\proxy_server . Both the light_server and flash_page and flash_page_erase() commands do not work together. But when I try to run it separately, it works properly.

Using Development Kit: Nrf-52 DK

SDK Version: nRF5_SDK_15.0

Mesh Version: : nrf5_SDK_for_Mesh_v2.2.0

int main(void)
{

  __LOG_INIT(LOG_SRC_APP | LOG_SRC_ACCESS | LOG_SRC_BEARER, LOG_LEVEL_INFO, LOG_CALLBACK_DEFAULT);

    initialize(eeprom_flag);

    execution_start(start);
    uint32_t f_addr= 0x00070000;
    uint32_t *p_addr= (uint32_t *)f_addr;
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Flashwrite Started\n");
    *p_addr= (uint32_t *) f_addr;  //pointer to the address
    nrf_nvmc_page_erase(f_addr);   
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Page erased successfully\n");
    eeprom_flag=true;

    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "sizeof: %d\n",sizeof(value));
    //value[5]= {3,4,5};
    for (;;)
    {
        (void)sd_app_evt_wait();
    if(eeprom_flag){;
    nrf_nvmc_write_words(f_addr,value,5);
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Word is written to the flash\n");
    eeprom_flag=false;
      for(int i=0; i<5; i++){
     __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Target Address: %d  ----------> The Data read from flash is: %d \n",f_addr+i,*(p_addr+i));
    }
    
    }
    }
}

13 in the Code blog below. it gives the error found in the picture when it comes to the line.

Related