zephyr/subsys/net/lib/openthread/platform
Michael Scott a923c2f1be net: openthread: fix off-by-one error in settings offset calculation
OpenThread uses CONFIG_OT_PLAT_FLASH_PAGES_COUNT to calculate the # of
pages at the end of flash to use for storing OpenThread settings.

This calculation has an off-by-one error which sets the offset for
the storage area as 1 page of flash too low.

For example, on nRF52840:
- default setting for CONFIG_OT_PLAT_FLASH_PAGES_COUNT is 4
- flash size is 1MB (0x100000)
- flash page size is 4096 (0x1000)
- expected offset is 0xfc000

Using the current logic we get an offset of: 0xfb000

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/16339

Signed-off-by: Michael Scott <mike@foundries.io>
2019-05-23 10:47:20 +03:00
..
alarm.c openthread: Update openthread version to latest upstream/master. 2018-12-20 12:24:51 +01:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
diag.c subsys: net: lib: Add OpenThread platform 2018-01-29 22:42:03 -05:00
flash.c net: openthread: fix off-by-one error in settings offset calculation 2019-05-23 10:47:20 +03:00
logging.c misra-c: Add 'U' to unsigned variable assignments in subsys/ 2018-12-04 22:51:56 -05:00
misc.c openthread: Update openthread version to latest upstream/master. 2018-12-20 12:24:51 +01:00
openthread-core-zephyr-config.h openthread: Convert FLASH_ERASE_BLOCK_SIZE to DT_ 2019-02-08 22:39:07 -06:00
platform-zephyr.h openthread: Update openthread version to latest upstream/master. 2018-12-20 12:24:51 +01:00
platform.c openthread: Update openthread version to latest upstream/master. 2018-12-20 12:24:51 +01:00
radio.c net: Check device driver API pointer 2019-05-07 15:41:15 +03:00
random.c openthread: Update openthread version to latest upstream/master. 2018-12-20 12:24:51 +01:00
shell.c net: openthread: remove one subcommand level in shell 2019-01-07 11:19:24 +01:00
spi.c subsys: net: lib: Add OpenThread platform 2018-01-29 22:42:03 -05:00