First application start after power up doesn't work

I have a Q2687 with FW 7.47.

The first part of my project is to build an LCD interface in order to communicate better with my application.

Apart from some glitches, overall the interface works, but I have the following two different results below:

  1. I give power to the board

  2. I hit ON/~OFF

  3. The module turns on

  4. The application starts (I know this because I get the TRACES and some serial messages back to the Development Studio (DS).
    Result: The LCD doesn’t display the message it is supposed to.

  5. I hit the RESET buttong

  6. I hit the ON/~OFF button

  7. The module turns on
    Result: the LCD displays the message it is supposed to (and I get the same messages on DS and TRACEs mentioned in 4) above).

From that point forward, any time I hit reset and then ON/~OFF I get the expected message on the LCD.

So, my problem is that I can’t figure out why the interface doesn’t work the first time I hit ON/~OFF after power up. I use a 3.3V LCD and I leave plenty of time before I send any commands or data to the LCD to make sure that the power is stabilized. I believe the problems is on the Q2687 side because the LCD works consistently when I plug it to another system that works with an Atmel AVR.

In addition, my final project will be set up in a way that the ON/~OFF will be tight to VDD in order to have the module turned on only by using a power switch. So, it is important to be able to get the module and the LCD get started properly from the first time it is powered up and turned on.

Does anybody have any feedback why I might be getting this inconsistent behavior the first time I turn on the module?

I attached my code in case somebody wants to try it. I believe by modifying the pint assignments on LCD2x16.h should be the only one thing that needs modification.

Thanks

My bad. My LCD initialization wasn’t correct. I was too fast to blame the module. Works fine now.