Hi. Faced with a strange situation. Example. All look good when I read code area:
void ex1 (void)
{
uint32_t *addr_out;
uint32_t i,word;
addr_out=(uint32_t *)0x0000000UL;
for (i=0;i<5;i++,addr_out++)
{
word=*addr_out;
NRF_LOG_INFO("addr %x, word %x\r\n",(uint32_t )addr_out, word );
}
NRF_LOG_INFO("OK\r\n");
NRF_LOG_FLUSH();
}
int main(void)
{
uint32_t err_code;
err_code = NRF_LOG_INIT(NULL);
APP_ERROR_CHECK(err_code);
ex1();
while(1)
{
}
}
But if I set RAM area I get the HardFault ... :(
addr_out=(uint32_t *)0x2000000UL;
What am I doing wrong?