#define RCC_CR *((long int*)0x40021000)
#define RCC_CFGR *((long int*)0x40021004)
#define RCC_CIR *((long int*)0x40021008)
#define RCC_APB2RSTR *((long int*)0x4002100C)
int main()
{
RCC_CR = 0x00010001;
while(!(RCC_CR & 0x00020000));
RCC_CFGR = 0x006BC000;
RCC_CR |= 0x01000000;
while(!(RCC_CR & 0x02000000));
RCC_CFGR |= 0x00000002;
while((RCC_CFGR & 0x0000000C) != 0x00000008); 一到着程序就飞了:(
RCC_APB2RSTR = 0x00005E7D;
while(1);
} |