Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

errata_xxx functions in system_nrf52840.c are optimized away

Hi,

During a debug session I noticed that the following functions in system_nrf52840.c are optimized away by the compiler since they always return true.

The functions errata_36(), errata_66(), errata_136() all show the same pattern as below.

static bool errata_36(void)
{
    if (*(uint32_t *)0x10000130ul == 0x8ul){
        if (*(uint32_t *)0x10000134ul == 0x0ul){
            return true;
        }
        if (*(uint32_t *)0x10000134ul == 0x1ul){
            return true;
        }
        if (*(uint32_t *)0x10000134ul == 0x2ul){
            return true;
        }
    }
    
    return true;
}

Is this done on purpose or is this a bug in the errata code?

I'm using SDK 15.2.0.

Thanks.

Parents Reply Children
No Data
Related