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
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
diag.c
flash.c net: openthread: fix off-by-one error in settings offset calculation 2019-05-23 10:47:20 +03:00
logging.c
misc.c
openthread-core-zephyr-config.h
platform-zephyr.h
platform.c
radio.c net: Check device driver API pointer 2019-05-07 15:41:15 +03:00
random.c
shell.c
spi.c