Hallo,
ich versuche gerade einen AT32UC3C auf externen Oszillator umzustellen.
Irgendwie kann ich aber nicht auf die dafür notwendigen "gelockten"
Power Manger(PM)-Register zugreifen. Ich habe es mit folgendem Code
probiert:
1 | AVR32_PM.unlock = 0xAA000000 | AVR32_PM_MCCTRL;
|
2 | AVR32_PM.MCCTRL.mcsel = 1;
|
Leider funktioniert das so nicht und ich bekomme damit immer einen
Access Error (AE)-Interrupt, d.h. das "unlocken" funktioniert wohl
irgendwie nicht.
Beim Zugriff auf die SCIF-Register klappt es aber:
1 | AVR32_SCIF.unlock = 0xAA000000 | AVR32_SCIF_OSCCTRL;
|
2 | AVR32_SCIF.oscctrl[0] = 0x00010040;
|
3 | while ( !(AVR32_SCIF.pclksr & 0x1) ); //Wait till oscillator is stable and ready to be used as clock source.
|
Hat jemand eine Idee, woran das liegen könnte??? Bin schon total
verzweifelt :(
Viele Grüße
Karl