This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NVM usage in nrf51422

I'm currently want to use the NVM with ble device, when I tried to send values from the mobile app to be stored to the NVM, it doesn't work, I guessed that the problem that it didn't recieve the data but it's not that , the problem appear when I use the nvm memory functions, I don't know the reason for that & how to overcome this problem.

Parents
  •            void edit_speed_ID(uint8_t speed)
               {		
           //pattern_ID_3();
            uint32_t value, err_code;
           value=0x00000000 | speed;
             err_code=sd_flash_write(address,(uint32_t *) & value,1);
           APP_ERROR_CHECK(err_code);
               flag=false;
               //	flash_init();
                }
    

    in the main function

    	if (flag==false)
    	{
    	speed = * address;
    	//speed = 5 *speed;
    	}
    

    and flag is global identifier.

Reply
  •            void edit_speed_ID(uint8_t speed)
               {		
           //pattern_ID_3();
            uint32_t value, err_code;
           value=0x00000000 | speed;
             err_code=sd_flash_write(address,(uint32_t *) & value,1);
           APP_ERROR_CHECK(err_code);
               flag=false;
               //	flash_init();
                }
    

    in the main function

    	if (flag==false)
    	{
    	speed = * address;
    	//speed = 5 *speed;
    	}
    

    and flag is global identifier.

Children
Related