This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2538: FlashMainPageErase() is resulting nothing at run time

Part Number: CC2538
Other Parts Discussed in Thread: Z-STACK

Hi,

I am trying to  store something to CC2538 Flash at the run time, it's returning nothing and stop working.

The same call I did at start of the Everything, resulting Zero, but After any action it's not working. Please look at my code:

  NWK_Bufffer = osal_mem_alloc(64);
    printf("22\n");
  sprintf(NWK_Bufffer, "%d%d%d", Switch1Sts, Switch2Sts, Switch3Sts);
    printf("33\n");
    
    int32_t Res = FlashMainPageErase(KIKO_PAGE_ADDR);
    printf("res=%d\n", Res);
    ASSERT(Res==0);
    printf("44\n");
    
    Res = FlashMainPageProgram((uint32_t*) NWK_Bufffer, KIKO_PAGE_ADDR, sizeof(NWK_Bufffer));
   printf("res=%d\n");
    ASSERT(Res==0);
    printf("55\n");
      osal_mem_free(NWK_Bufffer);

Till "33" it's printing, after it's stopping.

Thank you,

regards,

Raghu DS