EmbeddedRelated.com
The 2024 Embedded Online Conference

those crazy interrupts (2138)

Started by WadeA & RebeccaM Smith in LPC200015 years ago 44 replies

As soon as I enable the IRQs, pabort occurs. If I comment out U1Initialize() -- no problem. The code for uart1 is the same for uart0, with...

As soon as I enable the IRQs, pabort occurs. If I comment out U1Initialize() -- no problem. The code for uart1 is the same for uart0, with just the names changed to protect the ignorant. Obviously I am missing something. What it is? VIC assignments: * Addr/Cntl 0 = timer0 * Addr/Cntl 1 = i2c (not enabled) * Addr/Cntl 2 = spi (not enabled) * Addr/Cntl 3 = timer1 (not enabled) * Addr...


FreeRTOS 6.1.0, LPC1768, using queue from ISR causes hardfault

Started by Bastiaan van Kesteren in LPC200013 years ago 2 replies

Hi, This might be more of a FreeRTOS question then an LPC one, buth this being such a high-traffic list with lots of FreeRTOS questions...

Hi, This might be more of a FreeRTOS question then an LPC one, buth this being such a high-traffic list with lots of FreeRTOS questions anyways, I'll ask here first... I'm using FreeRTOS 6.1.0 on an LPC1768. Now i'm trying to use a queue from the UART0 ISR, which causes a hardfault in the pendsv_handler, which is called when leaving the ISR. I *think* i got the Cortex-M3 interrupt pr...


relocating code in RAM with lpc2106.

Started by Milind Deshpande in LPC200019 years ago 9 replies

Hi, I am a newbie doing firmware development on LPC2106 and using couple of interrupts for UART0 and TIMER1. The interrupts...

Hi, I am a newbie doing firmware development on LPC2106 and using couple of interrupts for UART0 and TIMER1. The interrupts work fine when the code resides in flash. However when I try to put the code in RAM for debug, the interrupts no longer work and so I cannot do any de


NGX Technologies Blueboard

Started by leon Heller in LPC200015 years ago 6 replies

NGX Technologies (Bangolore, India) recently sent me one of their new Blueboard LPC2148 systems for review. The main features are: JTAG...

NGX Technologies (Bangolore, India) recently sent me one of their new Blueboard LPC2148 systems for review. The main features are: JTAG Two DB-9 connectors for UART0 and UART1 USB SD-card Audio amplifier and speaker Eight LEDS driven by a 74HC595 Two pushbuttons (and reset) RTC (external battery) 2x16 character LCD module DAC audio output Potentiometer ...


UART transmit problem with GNU

Started by jesperkr123 in LPC200019 years ago 3 replies

Hey I'm trying to get the UART0 and UART1 working on my LPC2124 Olimex board. I use the WINARM GNU toolchain. I've wrote a simple...

Hey I'm trying to get the UART0 and UART1 working on my LPC2124 Olimex board. I use the WINARM GNU toolchain. I've wrote a simple code to test the UART. But when i send a byte to my PC, the received byte is wrong. This is my test program: void SetUART(int baud){ unsigned int divisor = pCF / (16 * baud); PINSEL0 |= 0


LPC2148 misses SPI0 interrupts if UART interrupts used

Started by l_marmsater in LPC200018 years ago 4 replies

Hi, Here is a gotcha that may cost you some time to find and resolve. If you are using interrupts to handle SPI0 transfers and UART0 or UART1...

Hi, Here is a gotcha that may cost you some time to find and resolve. If you are using interrupts to handle SPI0 transfers and UART0 or UART1 in an LPC2148, you may find that SPI0 interrupts do not always occur. You typically initialize an SPI transfer from the user level, say transmit the first byte of a buffer, and then let the ISR finish the transfer, until all bytes are shifted out ...


Calculating optimal baud rate

Started by Karim Emara in LPC200014 years ago 1 reply

Hi, I am working with LPC2148 and trying to figure out how optimal baud rate is computed for UART0. I tried to make an excel file to tryout...

Hi, I am working with LPC2148 and trying to figure out how optimal baud rate is computed for UART0. I tried to make an excel file to tryout all combinations and get the optimal values of (MulVal, DIVADDVAL and DL). However, optimal values are not the same shown in the user manual. I searched for similar calculators and found this calculator on nxp http://www.standardics.nxp.com/support/doc...


RS485 9 Bit Comms on LPC2148

Started by mhoneywill in LPC200018 years ago 4 replies

Hi, I'm implementing a comms protocol which requires RS485 half duplex comms with a 9 bit data word for the first byte. I'm new to the...

Hi, I'm implementing a comms protocol which requires RS485 half duplex comms with a 9 bit data word for the first byte. I'm new to the LPC214x chips so was wondering if anyone could give me some pointers. My thoughts are described below. Half Duplex Comms It looks like UART0 and UART1 have both FIFO empty and ShiftRegister empty Flags, IF you enable the THRE in


Problem with UART0 interrupts on LPC2364 and LPC2387

Started by niksaorlic in LPC200016 years ago 3 replies

I am trying to add UART communication to my project and am having some problems. I am using UART interrupts. Here is the UART...

I am trying to add UART communication to my project and am having some problems. I am using UART interrupts. Here is the UART initialization code: PINSEL0 = 0x00000050; U0LCR = 0x83; Fdiv = ( Fpclk / 16 ) / baudrate ; U0DLM = Fdiv / 256; U0DLL = Fdiv % 256; U0LCR = 0x03; U0FCR = 0x07; U0IER = 3; install_irq( UART0_INT, (void *)uart0_irq, HIGHEST_PRIOR...


Bizarre interaction between T1MR0 INTs and UART0's Baudrate

Started by microbit in LPC200020 years ago 1 reply

This is a weird one, I've reduced the functions to the ones that seem to interfere with one another :   (on LPC2106,...

This is a weird one, I've reduced the functions to the ones that seem to interfere with one another :   (on LPC2106, clocked at 10 MHz, on Nohau tester board)   I initialise


lpc2148 with uart is increasing delay in loop.. please help

Started by ani_rec_2001 in LPC200015 years ago 8 replies

Dear all, i am using lpc2148 UART0 in interrupt mode (code i got from this group only). along with this i am using timer interrupt to capture...

Dear all, i am using lpc2148 UART0 in interrupt mode (code i got from this group only). along with this i am using timer interrupt to capture some pulses. problem is my loop time is getting delayed( while(1) loop) . if i will remove printf statement then my device is working fast and if i will use printf it is adding delay in overall loop. how to use uart without delay. please help me Thanks ...


Uart 1 problem in LPC2103

Started by ahmedfarazvit in LPC200015 years ago

Hi all, The problem seems to be with the fractional divider registers of UART1. I have configured UART0 and UART1 for 9600bps with and...

Hi all, The problem seems to be with the fractional divider registers of UART1. I have configured UART0 and UART1 for 9600bps with and without fractional divider registers. The baud rate matches for both UARTs when there is no fractional divider used.=20 In configuration 1, I have taken MUL =3D 15 and DIV =3D 13 so that fractional division factor is less than 1.=20 In configuration 2, I...


Flash Utility V2.2.3 @115200bps with XTAL=10MHz ?

Started by Marcio Zaquela in LPC200018 years ago 5 replies

Hi guys, Does anyone know if it is possible to achieve 115200 bps using the 'LPC2000 Flash Utility' with LPC2138 and XTAL=10MHz ? The...

Hi guys, Does anyone know if it is possible to achieve 115200 bps using the 'LPC2000 Flash Utility' with LPC2138 and XTAL=10MHz ? The maximum baudrate I'm able to use is 38400. Even 57600 bps is not working. I made a routine to test UART0 @ 115200bps and I can only use this baudrate properly when I adjust the fractional divider register (U0FDR - LPC213x/01 devices only) to get the minimum...


problem UART - LPC2129 - kit olimex

Started by zied130187 in LPC200013 years ago 10 replies

hello, when i send data in U0THR U0THR = 0x41; printf ("U0THR = %X\n",U0THR); IAR display U0THR = FF why U0THR have FF value...

hello, when i send data in U0THR U0THR = 0x41; printf ("U0THR = %X\n",U0THR); IAR display U0THR = FF why U0THR have FF value and don't have 41 value ? this is function of initialization of UART0 void UART0Init(U16 baud) { U16 divisor = getperipheralClockFreq() / (16 * baud); U0LCR_bit.DLAB=1; //Enable DLAB U0LCR_bit.WLS=3; //8 bits U0LCR_bit.SBS=1; //...


LPC 2387 with LPC 2368 settings.

Started by don_diego_1635 in LPC200016 years ago

Hi All, I soldered and wrapped a LPC 2387, then I connected Flash Magic 4.18 on the UART0 and I saw the flash display memory, tried a fill...

Hi All, I soldered and wrapped a LPC 2387, then I connected Flash Magic 4.18 on the UART0 and I saw the flash display memory, tried a fill and it worked. I compiled a known program with a LPC 2368 setting in Keil MDK-ARM 3.2 instead of LPC 2387 because the device is not the project options of the Keil toolchain or IAR KickStart, then I downloaded the hex file in the chip and tried to ...


One line inverted UART (LANC <--> 2148)

Started by Kevin Townsend in LPC200015 years ago 4 replies

I wanted to connect a 2148 to the LANC port on a Canon/Sony video camera to control the focus/zoom/etc., which should be fairly easy since...

I wanted to connect a 2148 to the LANC port on a Canon/Sony video camera to control the focus/zoom/etc., which should be fairly easy since LANC uses a basic inverted 8 byte asynchronous pattern (http://www.boehmel.de/lanc.htm). I can read the signals with my logic probe, but reading through the 2148 user manual, I don't see how to use inverted signals with UART0/1 on the 2148. Is t...


UART initialisation?

Started by Leon Heller in LPC200017 years ago 3 replies

I'm trying to get output from UART0 using this very simple initialisation code, and am not getting anything transmitted. Can anyone see what I'm...

I'm trying to get output from UART0 using this very simple initialisation code, and am not getting anything transmitted. Can anyone see what I'm doing wrong. void Initialise(void) { // initialise PLL PLL0CFG=0x24; // Cclk = 60Mhz PLL0CON=0x01; PLL0FEED=0xAA; PLL0FEED=0x55; while(!(PLL0STAT & 0x0400)) ; PLL0CON=0x3; PLL0FEED=0xAA; PLL0FEED=0x55; // initialise ...


LPC2138 UART bug or docs problem?

Started by Stephen Pelc in LPC200018 years ago 26 replies

While testing a Flash copy routine for an LPC2138, I foolishly inserted some test code and ran into the following problem. 1) The code runs...

While testing a Flash copy routine for an LPC2138, I foolishly inserted some test code and ran into the following problem. 1) The code runs in RAM 2) 14.7... MHz XTAL, clock = xtal*4, VPBDIV=1 3) All interrupts disabled 4) UART0 at 115200 baud. If the UART character transmit loop is too tight when sending a string, transmission fails. dis emit EMIT ( 4000.02DC 24801FE5 $..e ) l...


LPC2101 115200 Baudrate Issues at 12MHZ Oscillator Frequency(Fosc)

Started by prab...@yahoo.co.in in LPC200015 years ago 10 replies

Hi all, I am using UART0 for serial communication in LPC2101. When i am testing various baurdrate,9600 is working for me. But 115200 is...

Hi all, I am using UART0 for serial communication in LPC2101. When i am testing various baurdrate,9600 is working for me. But 115200 is not working.This baudrate in needed for my proect. I am using 12MHZ oscillator frequency.(Fosc).Pll is Enabled and vpbdiv is 0.If anybody faced or familiar this issue please share your knowledge. I am changing various Peripheral frequency values....


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...



The 2024 Embedded Online Conference