This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5659: Reset initialization of msp430f5659

Part Number: MSP430F5659


Hello,

I am using MSP430F5659 micro controller having 16X2 LCD

Problem:

After pressing the reset switch (which put ground on the RST pin) sometimes garbage data/ chinese characters comes on Lcd. circuitry has 2.2Nf and 42Kohm connected on the RMU PCB.

Please suggest the system initialization procedure.  My system init code is given below:

    WDTCTL = WDTPW | WDTHOLD;                 // Stop WDT
    //PMMCTL0 = PMMCTL0_L | PMMPW | PMMSWBOR;

    //SYSRSTIV = 0x02;
    __disable_interrupt();
    clock();

    P1DIR=0XFF;
    P1OUT=0X00;
    P5DIR =0XFF;
    P5OUT=0X00;
    P4DIR =0XFF;
    P4OUT=0X00;
    P2DIR =0XFF;
    P2OUT=0X00;
    P3DIR =0XFF;
    P3OUT=0X00;

    __delay_cycles(400000);
    clock();
    __delay_cycles(400000);
   lcd_init();
    __delay_cycles(40000);
    lcd_init();
    __delay_cycles(40000)

  • Hi Shaifali,

    Seems like you are using an external LCD driver to drive your LCD, since F5659 doesn't have an LCD driver peripheral, right?
    Could you please firstly check if your LCD driver works well? From my quick suspicion, there is something wrong between the LCD driver and LCD screen.
    Please let me know if you have update.

    Regards,
    Harry
  • Hi Shaifali,

    did you release the RST button again so that code can be executed. If not your device is still in RESET in this mode all pins are HiZ and are floating. This means the control signals to your external LCD are floating which can cause random behavior.

  • I have power supply to my controller from 2 sources (solar and battery). There is switching between these power supply whichever is available. On switching between supplies sometimes garbage data appears on lcd.
    Even on start of the mcu garbage appears on lcd that can lead to the assumption that controller has not started properly.
    So I want to know the instructions required to reset the controller and start it properly.
    And I have not used external LCD driver. 16X2 Lcd is driven by Mcu pins.
    Problem is occuring on start of mcu not after that so the problem may not be related to lcd code.
  • Hi Shaifali,

    if you press RST button a BOR will be executed which will completly restart your device. The same might appear if DVCC is switched between battery and solar here I expect a dip on the supply causing a short power down. Anyway here a brownout (power cycle) will be executed. You can check this by tracing the MSP supply with a scope during switching.

    At least for the brownout the LOCKLPM5 bit is reset which will bring your GPIOs back to HiZ state. Same appears if BOR is executed via RST pin.
    I cannot see where you handle the LOCKLPM5 bit.

    To ensure you LCD is not showing garbage you should apply external pull downs ensuring LCD segements are off if driver pins from MSP are undefined during RESET.

    Best regards,
    Dietmar

**Attention** This is a public forum