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

sd_flash_write

PLease, could anyone provide me a code exaple on which i can learn how to use sd_flash_write & sd_flash_erease ? 

I tried to use them but keil give me this : 

.\_build\nrf51822_xxac.axf: Error: L6218E: Undefined symbol flash_word_write (referred from main.o).

Thanks 

Parents
  • Hi,

    flash_word_write is a function defined in the flashwrite example in the SDK, this is not related to the use of sd_flash_write & sd_flash_erease. How are you trying to use the functions? Are you using them in a softdevice project?

    Best regards,
    Jørgen

  • Hi. I solved that error. but i still cant write in memory while i am using the sde. 

    The code pass over the lines, erases properly the memory but doesn't write anything. 

    I want to know how to write... and which is the free memory i can use. 

    In the code below you can see what i am doing ( i use codesize-2 because i already used codesize-1 to write something before initialize the sde) 



    pg_size = NRF_FICR->CODEPAGESIZE;
    pg_num = NRF_FICR->CODESIZE-2; // Use last page in flash
    //---------------------------------
    addr = (uint32_t *)(pg_size * pg_num);
    uint32_t buffer[3]={1,2,3};
    sd_flash_page_erase(pg_num);
    nrf_delay_ms(50);
    devuelve= sd_flash_write(addr,(uint32_t*)buffer,3);



    devuelve is 0.... and nothing is writed in flash

Reply
  • Hi. I solved that error. but i still cant write in memory while i am using the sde. 

    The code pass over the lines, erases properly the memory but doesn't write anything. 

    I want to know how to write... and which is the free memory i can use. 

    In the code below you can see what i am doing ( i use codesize-2 because i already used codesize-1 to write something before initialize the sde) 



    pg_size = NRF_FICR->CODEPAGESIZE;
    pg_num = NRF_FICR->CODESIZE-2; // Use last page in flash
    //---------------------------------
    addr = (uint32_t *)(pg_size * pg_num);
    uint32_t buffer[3]={1,2,3};
    sd_flash_page_erase(pg_num);
    nrf_delay_ms(50);
    devuelve= sd_flash_write(addr,(uint32_t*)buffer,3);



    devuelve is 0.... and nothing is writed in flash

Children
No Data
Related