Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $_TARGETNAME configure -event reset-init {
- soft_reset_halt
- # RSTC_CR : Reset peripherals
- # mww 0xfffffd00 0xa5000004
- # disable watchdog
- mww 0xfffffd44 0x00008000
- sleep 10
- # enable user reset
- mww 0xfffffd08 0xa5000001
- # CKGR_MOR : enable the main oscillator
- mww 0xfffffc20 0x00000701
- sleep 10
- # CKGR_PLLR: 96.1097 MHz
- mww 0xfffffc2c 0x10480a0e
- # mww 0xfffffc2c 0x00481c0e
- sleep 10
- # PMC_MCKR : MCK = PLL / 2 ~= 48 MHz
- mww 0xfffffc30 0x00000007
- sleep 10
- # MC_FMR: flash mode (FWS=1,FMCN=73)
- mww 0xffffff60 0x00320100
- # mww 0xffffff60 0x00490100
- sleep 100
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement