Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


simple UART Transmit and Receive on LPC1778

Posted by John Gaffey on August 13, 2013
I am trying to do a very simple transmit and receive a char on UART0 I have this for transmit:
void UART_Task_Init()
UART_CFG_Type UARTConfigStruct; /* UART Configuration structure variable */
UART_FIFO_CFG_Type UARTFIFOConfigStruct; /* UART FIFO configuration Struct variable */

/* Initialize UART Configuration parameter structure to default state:
* Baudrate = 9600bps, 8 data bit, 1 Stop bit, None parity */

/* Set Baudrate to 115200 */
//UARTConfigStruct.Baud_rate = 115200;

/* Initialize UART0 peripheral with given to corresponding parameter */
UART_Init(LPC_UART0, &UARTConfigStruct);
#if 1

/* Initialize FIFOConfigStruct to default state:
* - FIFO_ResetRxBuf = ENABLE
* - FIFO_ResetTxBuf = ENABLE
* - FIFO_State = ENABLE
/* Initialize FIFO for UART0 peripheral */
UART_FIFOConfig(UARTx, &UARTFIFOConfigStruct);
/* Enable UART Transmit */

Followed by a:

UART_Send(UARTx, (uint8_t *)string, strlen(string), BLOCKING);

It seems to try and transmit:
UART_SendByte(UARTx, (*pChar++));

the first character and then times out.

Is this the right path?

Also do you have a example receive?
I could not find serial example for 1778.

RE: simple UART Transmit and Receive on LPC1778

Posted by Richard on August 14, 2013
As we support hundreds of chips, with a massive range of peripheral IP, we are unfortunately unable to provide support on chip specific configuration (unless it is directly related to a FreeRTOS port).

If the IP is the same as that used on the 1768 (which I think it is) then you will find a lot of serial port related code in the the FreeRTOS+IO product - which is a free download.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists