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) {
uart0_putc('u');
uart0_hex32(flashaddr);
uart0_hex32(FTFL_FSTAT);
//*(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?
Solved! Go to Solution.
I had forgotten to gate (?) the FTFA module!
SIM_SCGC6 |= SIM_SCGC6_FTFL;
Fixes my issue!
I had forgotten to gate (?) the FTFA module!
SIM_SCGC6 |= SIM_SCGC6_FTFL;
Fixes my issue!