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.