在线时间0 小时
UID170513
ST金币0
蝴蝶豆0
注册时间2007-8-24
新手上路
- 最后登录
- 1970-1-1
|
a0a.1 0b0c
int main(void)
{uint32 regval;
RCCcfg();
/*enable gpio port A clock*/
regval =RCC_APB2ENR&0x0000FFFB;
RCC_APB2ENR=regval|PORT_A_CLK_ENA;
/*enable AFIO clock */
regval =RCC_APB2ENR&0x0000FFFE;
RCC_APB2ENR=regval|AFIO_CLK_ENA;
/*set portA.0 as GPIO to drive LED */
PORT_A_CRL =0x01; //set port_a.0 as out put
/*set portA.8 as Clock out */
PORT_A_CRH =0x03 //set port_a.8 as out put,and set max speed at 50Mhz
|(0x02 |
|