EmbeddedRelated.com

Code help: Interrupts with LPC2129 and GCC

Started by Baldur Gislason in LPC200018 years ago 1 reply

I'm having a bit of a problem getting started in using interrupts in C with LPC2129 and GCC. The search function seems to be broken at this...

I'm having a bit of a problem getting started in using interrupts in C with LPC2129 and GCC. The search function seems to be broken at this moment so I'm starting a new thread. My problem is, there are so many interrupt sources, how can I tell from within the IRQ or FIQ routine where my interrupts are originating from? Would be great to see some example of interrupt code that uses multip...


LPC2129 PWM

Started by lehighuboy in LPC200020 years ago 1 reply

I'm using the Keil uVision IDE tool and the LPC2129. My question is about setting up single edge hardware PWMs. Someone previously ...

I'm using the Keil uVision IDE tool and the LPC2129. My question is about setting up single edge hardware PWMs. Someone previously posted the following code: REG(PWM0_PR)=0x0000; //no prescaler - one cpu clk is one PWM clk REG(PWM0_MCR)=0x0002; //Reset timer counter register


confusion on startup code of LPC2129

Started by skiddybird in LPC200012 years ago 2 replies

hi,fellows, For the demo port of FreeRTOS V7.1.0 for LPC2129 using IAR toolchain, I have many questions regarding the startup code to consult...

hi,fellows, For the demo port of FreeRTOS V7.1.0 for LPC2129 using IAR toolchain, I have many questions regarding the startup code to consult you. The relevant code is as below. SECTION .intvec:CODE:NOROOT(2) PUBLIC __vector PUBLIC __vector_0x14 PUBLIC __iar_program_start EXTERN vPortYieldProcessor ARM __vector: ;; ld...


LPC2129 CAN receiving problem ( send message == OK ) OLIMEX board sdk = eclipse

Started by prodrive11 in LPC200017 years ago 2 replies

Hi all. I'm a new lpc developer, I'v bought an Olimex lpc2129 board (which has embedded 2 x DB9 connectors for UART/COM ports and 2x CAN...

Hi all. I'm a new lpc developer, I'v bought an Olimex lpc2129 board (which has embedded 2 x DB9 connectors for UART/COM ports and 2x CAN ports). There are a PCA82C250 tranceivers for CAN protocol. I've read couple topics here with similar problems but I havent found an answere becouse people have problems mostly with FullCan hardware acceptance filters but they usually are able to get som...


How Erase LPC2129-UART RX FIFO

Started by srk in LPC200017 years ago 1 reply

Hi The code written for rx data in LPC2129-uartO U0LCR = 0x83; U0DLL = 39; // baud rate = 9615 ...

Hi The code written for rx data in LPC2129-uartO U0LCR = 0x83; U0DLL = 39; // baud rate = 9615 @ pclk = 6mhz U0FCR = 0x07; //FIFO enable U0LCR = 0x03; //Rx data as 8 bits, no Parity, 1 Stop bit while(!(U0LSR & 0x01)); //executed untill U0RSR full while(U0LSR & 0x01) { ch3[x] = U0R...


lpc2129 external interrupt 1 rising edge not working

Started by Sandhya P C in LPC200012 years ago 2 replies

Hi, I am trying to interface a PIR sensor to LPC2129. below is how I have configured the interrupt: // void ext(void) __irq //P0.3 as...

Hi, I am trying to interface a PIR sensor to LPC2129. below is how I have configured the interrupt: // void ext(void) __irq //P0.3 as external interrupt 1 { CMDWRT(0x01); LCD_DATA_WR("OBJECT DETECTED"); motor_stop(); EXTINT=0X02; //clear interrupt flag VICVectAddr = 0x00000000; VICIntEnable |= 0x00008000; } // in main program PINSEL0|=0X000000C0; // PINSEL0 =11 EXTPOLAR=0


LPC2129 - CAN receive interrupt issue

Started by suse auto in LPC200011 years ago 6 replies

Hello Group, I am using a development board with LPC2129. I downloaded the sample code i.e BlinkyCAN which came along with Kiel and Jlink...

Hello Group, I am using a development board with LPC2129. I downloaded the sample code i.e BlinkyCAN which came along with Kiel and Jlink package. The sample code is able to send and receive the CAN messages. However, if I put the breakpoint in Receive interrupt, the break point is never hit. May I know the reason? Can I any give me a sample code which has got simple CAN receive interrupt ...


lpc2129 CAN problem

Started by Rahul Bhatt in LPC200011 years ago 2 replies

hi following is my CAN transmitter code of lpc2129 void Can_Init_tx(void) { PINSEL1 |= (DWORD) 0x00014000; C2MOD = 1; C2GSR = 0; C2BTR...

hi following is my CAN transmitter code of lpc2129 void Can_Init_tx(void) { PINSEL1 |= (DWORD) 0x00014000; C2MOD = 1; C2GSR = 0; C2BTR = 0x00CBC01E; //baud rate 0f 125k C2TFI1 |= 0x80000000; C2MOD = 0; } void SendMessage(unsigned int x) { unsigned int status; while((C2SR & 0x00000004)==0); C2TFI1 = 0x00080000; //set DLC to 8 bytes; C2TID1 = 0x00000022; //sets 29 bit i...


LPC2129 UART ISR Problem

Started by lehighuboy in LPC200018 years ago 10 replies

I'm using the LPC2129 and Keil Tools. The purpose of the code is to interrupt on the receipt of a single byte of data and assign data to its...

I'm using the LPC2129 and Keil Tools. The purpose of the code is to interrupt on the receipt of a single byte of data and assign data to its value. The interrupt seems to work however data isn't the right value. Please help, Thanks. #include /* prototype declarations for I/O functions */ #include /* LPC21xx definitions */ void U1ISR(void) __irq; //Declare UA


LPC2129 (SW)-CANBus Error troubleshooting: RX Passive Error, REC = 128

Started by lawzaz in LPC200011 years ago 10 replies

Hi fellow forum-goers, I'm trying to add a general-purpose CAN to UART function to an LPC2129 setup. CAN1 works at 250 and 500kbps, so I...

Hi fellow forum-goers, I'm trying to add a general-purpose CAN to UART function to an LPC2129 setup. CAN1 works at 250 and 500kbps, so I modified my code to add CAN2 but am experiencing difficulty. I'm hoping one of you gurus is willing to look over my configuration. CAN2 is supposed to be "scalable" to any of several baud rates, but I am testing on 33.3kbps on a SINGLE WIRE networ


New to LPC2129 (coming from PIC) - Attempting to enter ISP mode from user code

Started by tc_lawabider in LPC200012 years ago 9 replies

Hi, I've recently inherited a project running an LPC2129 and FreeRTOS 6.1.1, and I've not got much background with this type of chip. I'm...

Hi, I've recently inherited a project running an LPC2129 and FreeRTOS 6.1.1, and I've not got much background with this type of chip. I'm trying to enter ISP mode from user code, using AN10356 and the help of one website which suggested I use a watchdog timer to ensure I can exit after the code upgrade has been performed. My code, unfortunately, does not seem to enter bootloader mode. If ...


LPC2194 UART BaudRate Problem

Started by Cheng in LPC200013 years ago 3 replies

I am using LPC2129 CAN QuickStart Board and trying to get UART work. But I found the chip on the board is LPC2194/01, not LPC2129. And I did some...

I am using LPC2129 CAN QuickStart Board and trying to get UART work. But I found the chip on the board is LPC2194/01, not LPC2129. And I did some research on the LPC2194/01 baudrate setting up for the rev 01 chip. Based on the baudrate calculation in the LPC2194 user manual, I set up the UART0 register as following: PCLK is 12,000,000 HZ Expected bitrate is 38400 U0LCR = 0x83; U0D...


Anyone Help me in interfacing LPC2129 with HDPM01(Digital Compass) using I2c

Started by kris...@gmail.com in LPC200014 years ago 1 reply

Refer data sheet : www.hoperf.com/upfile/hdpm01.pdf Here is my sample program for interfacing HDPM01 with LPC2129 with I2C.. Pls Help me ...

Refer data sheet : www.hoperf.com/upfile/hdpm01.pdf Here is my sample program for interfacing HDPM01 with LPC2129 with I2C.. Pls Help me further to get data from compass how should i calulate the direction from that data......... ************************************************************************************/ #include #include #define C_SET 1 #define C_RESET


TCP/IP over serial port on Keil MCB2100 (lpc2129)

Started by a_s_...@yahoo.com in LPC200018 years ago 4 replies

I guess a tcp/ip stack hasn\'t ever been ported on the keil mcb2100, particularly running on the philips lpc2129 processor. Badly need...

I guess a tcp/ip stack hasn\'t ever been ported on the keil mcb2100, particularly running on the philips lpc2129 processor. Badly need documentation and/or source for porting a tcp/ip stack, running on any OS... FreeRTOS, eCOS, whatever.... but over the serial port of the keil motherboard. Any help appreciated. http://dudafunk.myvnc.com ------------------------ Yahoo! Groups Sponsor -------...


Need demo for CrossWorks CTL that uses timers and interrupt IO on LPC2129

Started by Peter Klemm in LPC200016 years ago 1 reply

I am trying to understand how to manage IO with interrupts when using CrossWorks Tasking Library (CTL). I have a small program with 3 tasks. Two...

I am trying to understand how to manage IO with interrupts when using CrossWorks Tasking Library (CTL). I have a small program with 3 tasks. Two tasks just blink LEDs and the third outputs via UART0 using interrupts. I seem to not understand how to setup interrupts on the LPC2129, or maybe I am not understanding CTL and interrupt routines. Anyone have a good example program for CrossWorks ...


difference in execution time(Keil, LPC2129)

Started by ayman ghaly in LPC200018 years ago 5 replies

Hi all I measured the execution time of the code shown below using break point= s in the keil simulator and it was approximately 500...

Hi all I measured the execution time of the code shown below using break point= s in the keil simulator and it was approximately 500 micro seconds.=20 But when I measured the execution time of the same code from the Philips = ARM board LPC2129 it was about 3000 micro seconds. Do you have any idea about the cause of this difference? =20=20=20 Note that I used the following adju...


Problem with CAN on LPC2129/01 series

Started by amit kankaran in LPC200016 years ago 1 reply

Hi all, I am Having a problem with CAN on LPC2129/01 series. Whenever i recieve a CAN frame , the control is not coming out of ISR, but when...

Hi all, I am Having a problem with CAN on LPC2129/01 series. Whenever i recieve a CAN frame , the control is not coming out of ISR, but when i reset the CAN controller ,the control is coming out ,but after that i am not able to recieve next CAN frame . if i enable CAN controller again in main function ,it is continously switching b/w ISR and main() Following is my code #include


LPC2129 and U0FDR serial register

Started by tomi in LPC200014 years ago 2 replies

I have LPC2129 board: - 12MHZ crystal - PLL x5 enabled - VPDIV = 2 CCLK = 60MHz, PCLK=30MHz I'm trying to set serial baudrate...

I have LPC2129 board: - 12MHZ crystal - PLL x5 enabled - VPDIV = 2 CCLK = 60MHz, PCLK=30MHz I'm trying to set serial baudrate 115200. this setting is working correctly, but I have 1,73% error U0LCR = 0x83; // Enable access to divisor latchs U0DLL = 16; U0DLM = 0; U0LCR = 0x03; // 8n1 but with this I see trash U0LCR = 0x83; // Enable access to divisor latchs U0DLL = 12; U0DLM = 0;...


LPC2129 UART Help Needed

Started by rtos2010 in LPC200014 years ago 5 replies

I'm using the Keil MCB2100 Demo Board. LPC2129, 12MHZ crystal and PLLCFG_Val = 0x00000024 I'm using this UART demo code from " raju_nem ...

I'm using the Keil MCB2100 Demo Board. LPC2129, 12MHZ crystal and PLLCFG_Val = 0x00000024 I'm using this UART demo code from " raju_nem " at the following user group link/ It says "testing" near the code so I;m not sure it is fully working correctly? http://tech.groups.yahoo.com/group/lpc2000/files/LPC2129_UART/


sample code to interface 128*64 glcd with lpc2129

Started by aki_...@yahoo.com in LPC200013 years ago 2 replies

hi everyone.. i have a problem with interfacing jhd128*64 glcd with lpc2129.i am using keil uvision3 and it does not provide any inbuilt...

hi everyone.. i have a problem with interfacing jhd128*64 glcd with lpc2129.i am using keil uvision3 and it does not provide any inbuilt libraries to interface glcd. can anybody tell me from where can i download this graphic.h header file or inbuilt libraries which supports the interfacing of glcd.. or please provide me a sample code to interface glcd. ------------------------------------