#include "xinc_m0.h" /** * Initialize the system * * @param none * @return none * * @brief Setup the microcontroller system * */ extern void retarget_init(void); void SystemInit(void) { /*bit2:1 select clock source([00-OSC32M],[01-bbpll direct output],[10-bbpll div output],[11-rc16M])*/ *((volatile unsigned *)(0x40000000 + 0x130)) &= (~0x06); //*((volatile unsigned *)(0x40000000+ 0x130)) |=0x06; /*release BootDone --release pin bootctl1(gpio35)*/ *((volatile unsigned *)(0x40000000 + 0x1B0)) |= 0x10000000; retarget_init(); }