I've tried to change MDIV in PMC Master Clock Register in order to get a slower DDR clock when I run SAM-BA for my customized SAM9G15 board. I recompiled the applets, but clock is still at 133MHz. I'd like to slow it down to 100MHz, setting PCK_DIV4 to MDIV. Code changes below, in lowlevelinit.c:
Code: Select all
static void bypass_LowLevelInit (uint32_t extClk)
{
...
/* DDR clock = Processor Clock / MDIV / PLLADIV = 800MHz / 3 / 2 = 133MHz */
//mdiv = USER_MDIV(3);
/* DDR clock = Processor Clock / MDIV / PLLADIV = 800MHz / 4 / 2 = 100MHz */
mdiv = USER_MDIV(2);
...