2015-07-29 06:07 AM
i have done bootloader and its jumps.
but i like to know what the below line exactly does, Can anyone explain exactly why we give 0x2FFE0000 and do ''and '' mask and how it works?
if (((*(__IO uint32_t*)APPLICATION_ADDRESS) & 0x2FFE0000 ) == 0x20000000)
thank you
2015-07-29 07:35 AM
It's attempting to confirm if the initial stack pointer holds some valid value pointing to SRAM and not some random junk.
It's a rough test approximating the SP in the 0x20000000..0x2001FFFF (128KB) range.