Sam Price started a new discussion on bsps/arm/smdk2410/start/bspstart.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1547#note_161528

 >    rCLKDIVN = M_CLKDIVN;
 >    rMPLLCON = ((M_MDIV<<12)+(M_PDIV<<4)+M_SDIV);
 >    /* setup rREFRESH
 > -   * period = 15.6 us, HCLK=66Mhz, (2048+1-15.6*66)
 > +   * period = 15.6 us, HCLK=66.75Mhz, (2048+1-15.6*66.75)
 > +   * HCLK is taken in 10 kHz units so that 156*HCLK fits in 32 bits.
 >     */
 > -  REFCNT   = 2048+1-(15.6*get_HCLK()/1000000);

Expecting get_HCLK to return 66,750,000

```
In [10]: 15.6 * 66750000 / 1000000
Out[10]: 1041.3

In [11]: 66750000//10000*156//1000
Out[11]: 1041
```

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1547#note_161528
You're receiving this email because of your account on gitlab.rtems.org. 
Unsubscribe from this thread: 
https://gitlab.rtems.org/-/namespace/49/sent_notifications/6-1oeogsc2es7mmtctm6jo6lvgk-1d/unsubscribe
 | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | 
Help: https://gitlab.rtems.org/help


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to