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

write/read to the flash

Hi,

I am currently using SEGGER Embedded Studio version  4.12, nRF5 SDK version15.2.0,  nRF5 SDK for Mesh version 3.1.0,   Hardware BMD-300 Evaluation Board.

i using the uart to send data over the ble mesh and all work fine. now i want to write/read user data to/from the flash from specific address that i picked.

i found that code for write and read to/from the flash

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Copyright (c) 2010 - 2017, Nordic Semiconductor ASA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

this code work fine, but i didn't understand how it pick the address and where it put the address(which variable)? and how i pick and where i put address that i want? and how i know that the address that i pick it a "good" address?

thanks!