This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Programming LPC 2388

I have developed LPC2388 Board, The power supply is fine and even i am able to download the program on the board, once dwonloading problem was solved i wrote a sample program which will make all the ports pins on all port low...but when i checked the volatge on the PINS it always show 2.3volts. my feeling is i am making mstake in configuring the prots pins properly,

I would really appreciate if some one can provide a sample program which makes all the ports pins high and low...

Thanking you in advance

Parents
  • It looks like you're mixing calls to legacy IO and Fast IO registers. I would enable fast IO registers for PORT0 and 1, by setting GPIOM in SCS (on the 2368, your chip may be different).

    Also, check your FIOMASK registers and make sure they are 0'd. They should be by default on reset, but it doesn't hurt to check.

    You may also consider toggling the pins, that way if you can look at them on a scope you might be able to see something move around, and it will help you determine if you have pull-up/down issues.

    ND

Reply
  • It looks like you're mixing calls to legacy IO and Fast IO registers. I would enable fast IO registers for PORT0 and 1, by setting GPIOM in SCS (on the 2368, your chip may be different).

    Also, check your FIOMASK registers and make sure they are 0'd. They should be by default on reset, but it doesn't hurt to check.

    You may also consider toggling the pins, that way if you can look at them on a scope you might be able to see something move around, and it will help you determine if you have pull-up/down issues.

    ND

Children
  • Thank You very much for your reply, well, to set PORT0 and 1 to fast GPIO the instruction is same but then i feel it wont make a difference and what you said is very true there is no harm in making everything sure...I shall do it right away... Earlier i thought of toggling PINS i had even connected LEDs to see them blinking but when nothing happened i got desperate and thought let me check if it is even making it low...LOL

    well any way...i got one more doubt its about hardware, when i download the program through serial port, the chip is in the ISP mode, once the program is downloaded i press reset to run the user program,but next time when i again click start on Flash Magic without even pressing reset key , its starts downloading, so does this mean, the controller is still in ISP mode and it is unable to come out of ISP mode, how do i make sure that controller is out of ISP mode?

    I would appreciate the kind responses
    Thank you in advance.

  • According to the LPC23XX User manual:

    UM10211
    LPC23XX User manual
    Rev. 01 - 11 March 2008 User manual

    Chapter 29: LPC23XX Flash memory programming firmware

    4. Boot process flowchart

    Fig 131. Boot process flowchart


    Enter ISP MODE? (P2.10=LOW)