Files
2026-08-05 19:07:52 +08:00

23 lines
643 B
C

#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();
}