AnsweredAssumed Answered

Hard fault accessing flash config register (mkl26z)

Question asked by Joey Gouly on Jun 26, 2015
Latest reply on Jun 26, 2015 by Joey Gouly

Hi all,


I'm trying to refactor some code, and I'm hitting an issue but I can't figure out why.


I have the following code:


void hard_fault_isr() { uart0_putc('1'); }
void flash_erase_sector(uint32_t flashaddr) {
  //*(uint32_t *)&FTFL_FCCOB3 = 0x09000000 | flashaddr;
  [.. snip ..]


For some reason I'm getting a hard fault when I try to access FTFL_FTSTAT, or when I try to write to FTFL_FCCOB3. This is code that I have copied from another (working) project of mine.

What am I missing?