lpcware

uart4 register unknown

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Gonzalo_Sipel on Fri Oct 31 08:49:58 MST 2014
Hi everyone:
I'm working with a LPC1788 and I've found in "usart_001.c" and "usart_001.h" files the following piece of code:

[color=#63f]usart_001.c
#if defined(CHIP_LPC177X_8X) || defined(CHIP_LPC407X_8X)
case 4:
#else
case 0:
case 2:
case 3:
#endif
pUART->TER2 = UART_TER2_TXEN;
/* Wait for current transmit complete */
while (!(pUART->LSR & UART_LSR_THRE)) {}
/* Disable Tx */
pUART->TER2 = 0;
break;


usart_001h
typedef struct {/*!< USARTn Structure       */

__IO uint32_t IER;/*!< Interrupt Enable Register. Contains individual interrupt enable bits for the 7 potential
__IO uint32_t DLM;/*!< Divisor Latch MSB. Most significant byte of the baud rate divisor value. The full
....
....
....
#if !defined CHIP_LPC11XX
__IO uint32_t TER2;/*!< Transmit Enable Register. Only on LPC177X_8X UART4 and LPC18XX/43XX USART0/2/3. */
#endif
} IP_USART_001_T;[/color]

The problem is that when I look for pUART->TER2 (UART4) register in the user manul there is any register with that name. Furthermore, when I debug my proyect I see that pUART->TER2 is at 0x400A 405C direction and the last register of UART4 is at 0x400A 4058.
Somebody knows if is a user manual error or a library error??

Outcomes