Problems with pClock in IAR
2006-04-05 by gussabina
Hi: I have an application with a timer0 and uart0 working fine with Keil. Now, I 'm trying to port this app to IAR. But in order to have the same timing and serial rate working, I have to use pClock/4 instead of use pClock as I have with Keil. Is there any difference in these compiles about how they treat the pClock registers? I use a 14,7456 MHz crystal with M=4 and P=2. The PLLSTAT have 0x0523, so it is enabled and providing 58,9824 MHz for the cClock. VPBDIV is with 0 so the pClock should be 14,7456 MHz. (I saw an example from IAR where they use the same configuration, but the T0MR0 is loaded with pClock/4 to get 1 sec delay, and pClock=cClock/4.) Isn't it supposed that it should be T0MR0=pClock to have a 1 sec delay? What may be wrong? Thanks in advance! Gus