Why are common parts of LPC_UARTn_TypeDef's different?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Why are common parts of LPC_UARTn_TypeDef's different?

833 次查看
david_sudolcan
Contributor I

This question is in regard to this LPC407x_8x_177x_8x.h header file.

* $Id$  LPC407x_8x_177x_8x.h   2012-04-25
*//**
 * @file     LPC407x_8x_177x_8x.h
 *
 * @brief    CMSIS Cortex-M4 Cortex-M3 Peripheral Access Layer Header File for
 *           NXP LPC407x_8x_177x_8x.
 * @version  V0.7
 * @date     20. June 2012
 * @author NXP MCU SW Application Team
*
* Copyright(C) 2012, NXP Semiconductor
* All rights reserved.

Why are 8-bit values, such as THR, defined as 8-bit values for all but UART4, which is defined as a 32-bit value?

All the fields in the LPC_UART4_TypeDef are defined as 32-bit values, but not the other UART typedefs.  The datasheet shows the same info for fields like THR for all the different types of UARTs, but this header file defines them differently.  This causes issues for my generic UART class, that I can work around by typecasting, but this seems like these are errors in your header file.

0 项奖励
回复
3 回复数

717 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi David Sudolcan,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Before answering the question, I was wondering if you can share this head file, I'm curious whether it comes from the LPCOpen library or other libraries.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

717 次查看
david_sudolcan
Contributor I

Jeremy,

The header file came with the KEIL ARM MDK V5.26.2.0 download.  I attached it for your reference.

Thanks for looking into this on my behalf.

0 项奖励
回复

717 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi David Sudolcan,
Thank for your sharing, we'll reevaluation the definition of LPC_UART4_TypeDef and LPC_UART1_TypeDef later.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复