Hello,
The DFlash block should be erased if you didn’t write anything to it. Anyway, you can verify that it is not weakly erased using Read 1s Block command and selecting ‘User’ margin (Section 36.5.11.1, RM r.7).
It would be good to find out what the default ISR means. Could you check the S32_SBC[CFSR] register and BFAR register in case of a precise bus fault?
Are you sure the code you are using is correct, have you tried simply with a pointer, something like this:
uint32_t *ptr = (uint32_t*)0x10000000;
uint32_t data, address, i;
for(i=0; i<0x7FFF; i+=4){
data = *ptr++;
if(data == 0xFFFFFFFF){
address = (0x10000000 + i);
if(address == 0x10007FFC){
__asm__("BKPT");
ptr = (uint32_t*)0x10000000;
}
}
}
Regards,
Daniel