first submission

This commit is contained in:
qiyongshuang
2023-02-01 14:19:13 +08:00
parent d534aad004
commit b79c6ac80d
3711 changed files with 745432 additions and 2 deletions
+49
View File
@@ -0,0 +1,49 @@
/********************************** (C) COPYRIGHT *******************************
* File Name : main.c
* Author : WCH
* Version : V1.0.0
* Date : 2021/06/06
* Description : Main program body.
*********************************************************************************
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
* Attention: This software (modified or not) and binary are used for
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
*******************************************************************************/
/*
*@Note
MCO pin clock output routine:
MCO(PA8)
This example demonstrates that the MCO(PA8) pin outputs the system clock.
*/
#include "debug.h"
/*********************************************************************
* @fn main
*
* @brief Main program.
*
* @return none
*/
int main(void)
{
GPIO_InitTypeDef GPIO_InitStructure={0};
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4);
USART_Printf_Init(115200);
printf("SystemClk:%d\r\n",SystemCoreClock);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOA, &GPIO_InitStructure);
/* MCO Output GPIOA 8 */
RCC_MCOConfig( RCC_MCO_SYSCLK );
while(1);
}