USART 2 CFG register don't change

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

USART 2 CFG register don't change

394 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pmoreira on Fri May 01 08:33:57 MST 2015
Hi all, I am working with a proprietary hardware based in a LPC812M101JD20 that work ok with usart0 & usart1 port, but when try to change any port  to usart2 the system don't work.

I debug the code using LPCXpresso  and found that the CFG register of usart2 don't change when the code write in this. I use the function:

STATIC INLINE void Chip_UART_ConfigData(LPC_USART_T *pUART, uint32_t config)
{
uint32_t reg;

reg = pUART->CFG & ~((0x3 << 2) | (0x3 << 4) | (0x1 << 6) | UART_CFG_RESERVED);
pUART->CFG = reg | config;
}

Now, the strangest is that when I test the same code in a LPCXpresso LPC812 board the code work ok with usart 0,1 & 2.

Have any idea that is he reason for this anomaly?

Thinking in a hardware error , what is the possible problem in the proprietary hardware?

I attach the file for screen-shot for the debug session on the lpcxpresso software that show the problem, please see the USART2 CFG register, is in zero after the code wrote the value 0x05 in this register.

Many thanks in advance.
Labels (1)
0 Kudos
2 Replies

341 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pmoreira on Fri May 01 09:40:23 MST 2015
Hi R2D2, many thanks for the quick response.

You Have reason, I forgot that the LPC812M101JD20 have 2 serial ports and LPC812M101JDH20 have 3 serial ports (my fault was the 'H').

thanks.
0 Kudos

341 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri May 01 08:53:03 MST 2015

Quote: pmoreira
Hi all, I am working with a proprietary hardware based in a LPC812M101JD20 that work ok with usart0 & usart1 port, but when try to change any port  to usart2 the system don't work.



:D

How many USARTs has this chip  :quest:



Quote: pmoreira
Now, the strangest is that when I test the same code in a LPCXpresso LPC812 board the code work ok with usart 0,1 & 2.



That's not strange, that's a different chip  :O
0 Kudos