Hi, I am having problems setting up the USART on an AT91FR40162.
The AT91FR40162 is an AT91R4008 integrated with a 2MByte flash chip.
Basically, I disable P14 (TXD0) & P15 (RXD0) from the peripheral controller so that they may be used by the USART.
I then:
- Disable and reset the receiver and transmitter in US_CR (control register).
- I then set 8,n,1 MCLK in US_MR (mode register).
- Write the divider into US_BRGR (baud rate register).
- Enable receiver and transmitter in US_CR.
- At this point, the TXREADY and TXEMPTY bits are turned on as they should be in the USART status register.
My problem, no matter what value I write to US_BRGR, in step 3 above, it alway remains 0, what could be causing this, I have obviously missed something but what? Needless to say the USART does not work, even if I set it to local loopback.
Help, any advice would be greatly appreciated, Regards, Clive