Hi, I am new to the Nordic nrf52840, and want to start new project.
Currently, I am testing flash_fstorage_s140_pca10056 example.(version is : nRF5_SDK_17.0.2), and got successfully used the read and write functions to flash.
While testing this example, I got a few wonders.
static uint32_t nrf5_flash_end_addr_get()
{
uint32_t const bootloader_addr = BOOTLOADER_ADDRESS;
uint32_t const page_sz = NRF_FICR->CODEPAGESIZE;
uint32_t const code_sz = NRF_FICR->CODESIZE;
return (bootloader_addr != 0xFFFFFFFF ?
bootloader_addr : (code_sz * page_sz));
}
1. In uint32_t nrf5_flash_end_addr_get() function, I get it why it return 0x00010000(code_sz * page_sz). But I am curious why the value of code_sz is (0x00001000) and the value of page_sz is (0x00000100)(I checked this in debug mod). Is this values are variable to entire project size? If so, can I expect this values?
2. I get it the last address on the last page is equal to UICR.NRFFW[0]. But why every value of NRFFW is 0xffffffff? Is there other meaning that I didnt find?