When you enable a clock domain with the PCGCR register, is there a way to tell when that domains clock is stable and ready to talk?
For example, if I disable the clk for the uart, do stuff, then reenable it. How long do I need to wait? Is there a way to know if I am ready to talk with the IP? How long does it take for the baud clock to be ready?
do
{
CLKSTOP = 0x0010;
asm(" NOP");
}
while(0x0030 != CLKSTOP);
PCGCR1 |= ( 1 << 2 );
do stuff .....
PCGCR1 &= ~( 1 << 2 );
do
{
CLKSTOP = 0x0000;
asm(" NOP");
}
while(0x0000 != CLKSTOP);
How long do I need to wait until I can write out the Uart? For example:
UartRegs.RBR = 0x31;
Cheers!