SAMG55 changing the fast RC oscillator frequency

Discussion around product based on ARM Cortex M4 core.

Moderators: nferre, ncollot

Posts: 1
Joined: Thu Oct 15, 2015 4:51 pm

SAMG55 changing the fast RC oscillator frequency

Thu Oct 15, 2015 4:56 pm

Hello I am new to the Atmel line of controllers and I am having some issues with configuring the clocks. I am using the SAMG55 Xplained Pro eval board and need to learn how to change the frequency of the 8/16/24 MHz fast RC oscillator. According to the datasheet the chip at reset boots using the Fast RC oscillator configured for 8MHz. I want to change it to 16MHz. Here are the steps I am taking but I am having no luck. Datasheet says to first clear the WPEN write protection bit in the PMC_WPMR register to be able to write to the CKGR_MOR register to change the fast RC oscillator frequency but even so when i step through the code and check the registers in the IO debug wundow in Atmel Studio I ma not seeing CKGR_MOR change to my desired value (0x1). I am using bare metal without ASF.

Code: Select all

PMC->PMC_WPMR &= ~(PMC_WPMR_WPEN);           // disable CKGR_MOR write protection

PMC->CKGR_MOR = CKGR_MOR_MOSCRCF_16_MHz;     // pick 16MHz clock
while (!(PMC->PMC_SR & PMC_SR_MOSCRCS)) {    // wait until fast RC oscillator stabilizes

Return to “SAM4 Cortex-M4 MCU”

Who is online

Users browsing this forum: No registered users and 3 guests