LPC Open 1.19 LPC824 possible problems

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC Open 1.19 LPC824 possible problems

652 Views
kiryat8
Contributor III

In the lpcopen_2_19_lpcxpresso_nxp_lpcxpresso_824 zip, in the uart_8xx.h, the UART_CFG_TXPOL should be 23 if the user manual is correct!.

#define UART_CFG_RXPOL          (0x01 << 22)    /*!< Receive data polarity */
#define UART_CFG_TXPOL          (0x01 << 22)    /*!< Transmit data polarity */

In the gpio_8xx.h file there are three inline functions which take a byte bit parameter value and do not convert the bit to a byte. I would expect a 32 bit mask as the parameter or a bit to mask conversion for a single bit.

STATIC INLINE void Chip_GPIO_SetPortDIROutput(LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pinMask)
{
#ifdef CHIP_LPC82X
    pGPIO->DIRSET[port] = pinMask;

// ?!? Should be maybe uint32_t pinMask or (1L<<pinMask)

STATIC INLINE void Chip_GPIO_SetPortDIRInput(LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pinMask)
{
#ifdef CHIP_LPC82X
    pGPIO->DIRCLR[port] = pinMask;

STATIC INLINE void Chip_GPIO_TogglePortDIR(LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pinMask)
{
#ifdef CHIP_LPC82X
    pGPIO->DIRNOT[port] = pinMask;

1 Reply

500 Views
DavidS
NXP Employee
NXP Employee

Hi David,

I forwarded your post to our LPCOpen team.

Thank you for posting.

UPDATE:

From LPCOpen team:

Yes this is a typo, that will get fixed in an LPC8xx release next week.

Regards,

David