网站首页
编程语言
数据库
系统相关
其他分享
编程问答
STM32F6xx
2022-11-12
STM32F6xx外设驱动8-cpu(寄存器)nulceo144
//源文件//使能CPU的L1-CachevoidCache_Enable(void){SCB_EnableICache();//使能I-CacheSCB_EnableDCache();//使能D-Cache SCB->CACR|=1<<2;//强
2022-11-12
STM32F6xx外设驱动5-uart(寄存器)nulceo144
//源文件voidUartGpioConfig(){ RCC->AHB1ENR|=(1<<3);//使能GPIOD RCC->APB1ENR|=(1<<18);//使能USART3 RCC->APB2ENR|= //PD8TXDGPIOD->M
2022-11-12
STM32F6xx外设驱动6-adc(寄存器)nulceo144
//源文件voidADCPhyConfig(){ RCC->APB2ENR|=1<<8;//使能ADC1时钟 RCC->AHB1ENR|=1<<0;//使能PORTA时钟 //PA5输入模式、下拉、高速GPIOA->MODER
2022-11-12
STM32F6xx外设驱动7-dac(寄存器)nulceo144
//源文件voidDACPhyConfig(){RCC->APB1ENR|=1<<29;//使能DAC时钟RCC->AHB1ENR|=1<<0;//使能PORTA时钟 //PA4输入模式、下拉、高速GPIOA->MODER
2022-11-12
STM32F6xx外设驱动4-timer(寄存器)nulceo144
//源文件voidTimerPhyConfig(){RCC->APB1ENR|=(1<<1);//使能Timer3 TIM3->ARR=arr; TIM3->PSC=psc; TIM3->DIER=(1<<0);//Updateinterr
2022-11-12
STM32F6xx外设驱动2-delay(寄存器)nulceo144
//源文件staticuint32_tfac_us=0;//us延时倍乘数/***@brief初始化延迟函数* 当使用ucos的时候,此函数会初始化ucos的时钟节拍* SYSTICK的时钟
2022-11-12
STM32F6xx外设驱动3-rcc(寄存器)nulceo144
//源文件voidRccPhyConfig(){ uint16_tretry=0; RCC->APB1ENR|=1<<28;//电源接口时钟使能PWR->CR1|=3<<14;//高性能模式,时钟可到180MhzPWR->CR1|=1
2022-11-12
STM32F6xx外设驱动1-led(寄存器)nulceo144
//源文件voidLedPhyConfig(){RCC->AHB1ENR|=(1<<1);//使能GPIOB//LD1GPIOB->MODER|=(1<<0*2);//输出模式GPIOB->OTYPER&=~(1<<0);//推挽