LPC 2138 code is not executing

Hello;
I have one problem in LPC2138 Proto-Type board . I am able to write a code in its flash memory
using flash magic. Hex file is successfully loaded . but after Resetting or in power on mode code is not executed . I used 12 Mhz crystal . I tried LED blinking code.

Parents
  • Hello sir,
    I am using ISP mode (UART 0 - RS232)for programming & External oscillator(12 MHZ ).
    I used flash magic for loading HEX file & it's successfully loaded. but after loading HEX file program is not executed .I check reset circuit it's properly working when reset switch is press reset pin make low(0).I include startup file in my LED Blinking project.
    I don't have any JTAG Interface. But my code working properly in Proteus .I don't know what actual issue is there any RESET PROBLEM or Crystal PROBLEM .& one thing is that sometimes when i touch the crystal XTAL 1(pin-62) pin using voltmeter probe(voltmeter in continuity or dc volt mode) LED start blinking or some time LED continuously ON .

    Hear my code- LED BLINKING
    #include <lpc213x.h>

    void delay(unsigned long val);
    int main(void)
    { IO1DIR = 0xFFFFFFFF; // Configure all pins on Port 0 as Output

    while(1) { IO1SET = 0xFFFFFFFF; // Turn on LEDs delay(5000000);

    IO1CLR = 0xFFFFFFFF; // Turn them off delay(5000000); } // return 0; // normally this wont execute
    }

    void delay(unsigned long val)
    { while(val>0) { val--; }
    }

    Thank you.

Reply
  • Hello sir,
    I am using ISP mode (UART 0 - RS232)for programming & External oscillator(12 MHZ ).
    I used flash magic for loading HEX file & it's successfully loaded. but after loading HEX file program is not executed .I check reset circuit it's properly working when reset switch is press reset pin make low(0).I include startup file in my LED Blinking project.
    I don't have any JTAG Interface. But my code working properly in Proteus .I don't know what actual issue is there any RESET PROBLEM or Crystal PROBLEM .& one thing is that sometimes when i touch the crystal XTAL 1(pin-62) pin using voltmeter probe(voltmeter in continuity or dc volt mode) LED start blinking or some time LED continuously ON .

    Hear my code- LED BLINKING
    #include <lpc213x.h>

    void delay(unsigned long val);
    int main(void)
    { IO1DIR = 0xFFFFFFFF; // Configure all pins on Port 0 as Output

    while(1) { IO1SET = 0xFFFFFFFF; // Turn on LEDs delay(5000000);

    IO1CLR = 0xFFFFFFFF; // Turn them off delay(5000000); } // return 0; // normally this wont execute
    }

    void delay(unsigned long val)
    { while(val>0) { val--; }
    }

    Thank you.

Children
More questions in this forum