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




Loading

How to implement the Serial IrDA on LM3S6965

Posted by Bill Yang on October 30, 2008
Hi, I am not familiar to SIR IrDA and have a question regarding the Serial (or Slow) IrDA implementation over the LM3S6965 or any Cortex-M3 architecture. Current I worked on a project that has two infrared serial devices to connect to the UART1 and UART2 (or the IrDA port 1 & 2) on the LM3S6965, but I could not get them to Tx/Rx through a interrupt service routine. If someone has an idea how to configure and implement this UART port and can share a sample code with me, it will be greatly appreciated. The following code is configuration of SIR1 and SIR2.
/* Enable the UART and IrDA. GPIOA has already been initialised. */
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART2);

/* Set GPIO A0 and A1 as peripheral function. They are used to output the
UART signals. D2/D3 and G0/G1 for IrDA */
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
GPIOPinTypeUART(GPIO_PORTD_BASE, GPIO_PIN_2 | GPIO_PIN_3);
GPIOPinTypeUART(GPIO_PORTG_BASE, GPIO_PIN_0 | GPIO_PIN_1);
/* Configure the UART to 115200 for 8-N-1 operation. */
UARTConfigSet( UART0_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE );
UARTConfigSet( UART1_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE );
UARTConfigSet( UART2_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE );
/* We dont want to use the fifo. */
HWREG( UART0_BASE + UART_O_LCR_H ) &= ~mainFIFO_SET;
/* Enable the SIR1 and SIR2 */
UARTEnableSIR(UART1_BASE, (tBoolean) false);
UARTEnableSIR(UART2_BASE, (tBoolean) false);

/* Enable both Rx and Tx interrupts. */
HWREG( UART0_BASE + UART_O_IM ) |= ( /*UART_INT_TX |*/ UART_INT_RX );
IntEnable( INT_UART0 );
/* Enable IrDA1 and IrDA2 interrupt */
HWREG( UART1_BASE + UART_O_IM ) |= ( /*UART_INT_TX |*/ UART_INT_RX );
IntEnable( INT_UART1 );
HWREG( UART2_BASE + UART_O_IM ) |= ( /*UART_INT_TX |*/ UART_INT_RX );
IntEnable( INT_UART2 );

thanks,
Byang

RE: How to implement the Serial IrDA on LM3S6965

Posted by Dave on October 30, 2008
Try the Luminary Micro driver library, or the Luminary Micro support desk. Please keep to FreeRTOS questions here.


[ 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