I may have misled you on the problem. In fact, I'm not sure I can point you to the problem at all yet. For some reason, when using MCUXpresso with the generic flash driver to load code into flash (and verified that the correct code is there), as soon as I take the SPIFI into command mode, then back into memory mode in my application, all the code in flash gets somehow initialized. All of flash. I'm not sure why, and I didn't even think that was possible.
However, in my attempts to figure it out, I did find what I think is a bug in clock_18xx_43xx.c in function Chip_Clock_SetDivider().
This line:
/* Mask off bits that need to changes */
reg &= ~((0x1F << 24) | 1 | (0x0F << 2));
does a nice job of masking off the divider values for IDIV_A-D, but does not clear all the bits for IDIV_E. If the IDIV_E is set to something that uses the top four bits (anything over 15), then those bits remain set even if you set the divisor to a smaller number.
The line should read
reg &= ~((0x1F << 24) | 1 | (0xFF << 2));
Thanks. I will let you know if I figure out what else is going on with the flash.