AnsweredAssumed Answered

"Flash driver failed to initialize" on LPXpresso802

Question asked by James Smith on Nov 8, 2018
Latest reply on Nov 14, 2018 by James Smith

I was experimenting with the SYSAHBCLKCTRL0 register on my LPXpressor802 board and appear to have locked it up.  Any suggestion as to how I can reset my board (I have a Segger Jlink that I can use, if necessary).


It was working okay when I had an OR in my first line

  SYSCON->SYSAHBCLKCTRL0 |= 0b000000000000000000000000000001000000;

but when I changed that to a simple equal, like this

  SYSCON->SYSAHBCLKCTRL0 = 0b000000000000000000000000000001000000;

and then ran the program.  My suspicion is that by not using the OR I have cleared a bit that I wasn't supposed to.  (I understand that removing the OR wasn't a smart thing to do... I'm trying to see if changes like this break the board before using it to teach in a classroom.)


Here is the program I was trying to run


void main(void) {
// Power up GPIO 0 unit via Bit 6 on AHB Clock Control Register
  SYSCON->SYSAHBCLKCTRL0 = 0b000000000000000000000000000001000000;

  // Preemptively turn off the LED on GPIO bit 8.
  GPIO->SET[0] = 0b000000000000000000000000000100000000;

  // Set data direction on GPIO bit 8 to Output.
  GPIO->DIRSET[0] = 0b000000000000000000000000000100000000;

  // Turn on the LED on GPIO bit 8.
  GPIO->CLR[0] = 0b000000000000000000000000000100000000;

} // end of main

flash failed to initialize