关于STM32的stm32固件库v3.5有最新版本的,发下链接,谢谢

关于STM32的固件库有最新版本的,发下链接,谢谢_百度知道
关于STM32的固件库有最新版本的,发下链接,谢谢
提问者采纳
STM32的固件库分为好几个, 比如STM32F1xx, STM32F2xx, STM32F4xx, STM32Lxx,STM32F05x 楼主需要哪一个? 这些固件库都可以在ST的官方网站上找到:
只需要在搜索栏中输入你开发的STM32器件型号, 在对应的页面中可以找到这个器件的所有相关资料, 包括固件库.
提问者评价
其他类似问题
为您推荐:
stm32的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁stm32固件库哪里下载_百度知道
stm32固件库哪里下载
最新的3.5的STM32固件库找不到呢,谁有的发给我一下吧
提问者采纳
点这个地址下载最新的库,3.5版的,21.1MB:太大了,没法传送,你直接点这个下载就成。
提问者评价
其他类似问题
为您推荐:
您可能关注的推广
stm32的相关知识
其他2条回答
st的官方网站上,各种版本的库都能找到的,还有相关的应用文档和技术手册
现在是这个地址了,
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁查看: 3573|回复: 16
求救stm32固件库v3.5版本
串口调试不通
RT,我用V3.5的固件库调试USART1调试了一天了都还没调通,用V2.0的固件库一下就OK了,请问在V3.5固件库下怎么设置串口?&&纠结啊!&&把我的程序贴给大家,麻烦各位大虾帮帮偶,小弟刚学习STM32!
/* Includes ------------------------------------------------------------------*/
#include &stm32f10x.h&
#include &stdio.h&
/* Private macro -------------------------------------------------------------*/
GPIO_InitTypeDef & & & & & & & & & & & & GPIO_InitS//声明GPIO_InitStructure
USART_InitTypeDef & & & & & & & & & & & & USART_InitS
TIM_TimeBaseInitTypeDef & & & & TIM_TimeBaseS
NVIC_InitTypeDef & & & & & & & & & & & & NVIC_InitS
/* Private variables ---------------------------------------------------------*/
u8 TX_Buf[6]={&Hello!&};
/* Private functions ---------------------------------------------------------*/
&&* @brief&&Software Delay program.
&&* @param&&nCount
&&* @retval None
void Delay(vu32 nCount)& & & & & & & & //延时函数
&&for(; nCount != 0; nCount--);
&&* @brief&&GPIOD configuration program.
&&* @param&&None
&&* @retval None
&&* @brief&&USART1 configuration program.
&&* @param&&None
&&* @retval None
void USART1_Config(void)
& & & & GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
& & & & GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
& & & & GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
& & & & GPIO_Init(GPIOA,&GPIO_InitStructure);& & & &
& & & & GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
& & & & GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
& & & & GPIO_Init(GPIOA,&GPIO_InitStructure);
& & & & //以上为配置USART1管脚的模式
& & & & USART_InitStructure.USART_BaudRate = 115200;& & & && && & & & & & & & & & & & & & & & //波特率设置为:115200
& & & & USART_InitStructure.USART_WordLength = USART_WordLength_8b;& & & &&&& & & & //8位数据长度
& & & & USART_InitStructure.USART_StopBits = USART_StopBits_1;& & & & & & & & & & & & //1位停止位
& & & & USART_InitStructure.USART_Parity = USART_Parity_No;& & & & & & & && && & & & & & & & //无奇偶校验
& & & & USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_N& & & && &//失能硬件控制流
& & & & USART_InitStructure.USART_Mode = USART_Mode_Tx | USART_Mode_Rx;& & & & //使能接收和发送
& & & & USART_Init(USART1,&USART_InitStructure);& & & & //初始化USART1
& & & & USART_ITConfig(USART1,USART_IT_TC,ENABLE);
& & & & USART_ITConfig(USART1,USART_IT_RXNE,ENABLE);
& & & & USART_Cmd(USART1,ENABLE);
}& & & && &
&&* @brief&&NVIC configuration program.
&&* @param&&None
&&* @retval None
void NVIC_Config()& & & && &//嵌套向量中断控制器配置函数
& & & & NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);& & & & & & & & //配置优先级分组:&&0位先占优先级,4位从优先级
& & & & NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
& & & & NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
& & & & NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
& & & & NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
& & & & NVIC_Init(&NVIC_InitStructure);& & & &
&&* @brief&&Main program.
&&* @param&&None
&&* @retval None
int main(void)
&&/*!& At this stage the microcontroller clock setting is already configured,
& && & this is done through SystemInit() function which is called from startup
& && & file (startup_stm32f10x_xx.s) before to branch to application main.
& && & To reconfigure the default setting of SystemInit() function, refer to
& && & system_stm32f10x.c file
& &&&*/& &&&
//& & & & SystemInit();
& & & & RCC_APB1PeriphClockCmd(RCC_APB2Periph_GPIOA|RCC_APB2Periph_AFIO|RCC_APB2Periph_USART1,ENABLE);
&&/* Add your application code here
& & & & USART1_Config();
& & & & NVIC_Config();
& & & & & & & & USART_SendData(USART1,0x31);
& & & & & & & & while(USART_GetFlagStatus(USART1,USART_FLAG_TC)==RESET);
&&/* Infinite loop */
&&while (1)
&&{ & & & &
编译通过了,但是下载到目标板上的时候串口1什么都没输出!& &实在不知道是哪出问题了,还望各位大虾帮帮小弟!&&不胜感激
搞定了,但是很奇怪,为什么我设定串口USART_InitStructure.USART_BaudRate = 115200;& & //波特率设置为:115200& &
实际却是57600呢?&&这是库的BUG么?
公益广告:本论坛不得使用、宣传Q群。 有讨论请在论坛里进行。 违者将封锁ID.
我用的3.5固件,没这个问题,多少波特率就是多少
公益广告:发表招聘帖子需要缴费,有需要可以联系网站工作人员王小姐:.
/* Includes ------------------------------------------------------------------*/
#include &stm32f10x.h&
#include &stdio.h&
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
u8 TX_Buf[8]={&Hello!\r\n&};
/* Private functions ---------------------------------------------------------*/
&&* @brief&&Software Delay program.
&&* @param&&nCount
&&* @retval None
void Delay(vu32 nCount)& & & & & & & & //延时函数
&&for(; nCount != 0; nCount--);
&&* @brief&&GPIOD configuration program.
&&* @param&&None
&&* @retval None
&&* @brief&&USART1 configuration program.
&&* @param&&None
&&* @retval None
void USART_Config(void)
& & & & USART_InitTypeDef USART_InitS
& & & & USART_InitStructure.USART_BaudRate = 9600;& & & && && & & & & & & & & & & & & & & & //波特率设置为:115200
& & & & USART_InitStructure.USART_WordLength = USART_WordLength_8b;& & & &&&& & & & //8位数据长度
& & & & USART_InitStructure.USART_StopBits = USART_StopBits_1;& & & & & & & & & & & & //1位停止位
& & & & USART_InitStructure.USART_Parity = USART_Parity_No;& & & & & & & && && & & & & & & & //无奇偶校验
& & & & USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_N& & & && &//失能硬件控制流
& & & & USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;& & & & //使能接收和发送
& & & & USART_Init(USART1,&USART_InitStructure);& & & & //初始化USART1
//& & & & USART_ITConfig(USART1,USART_IT_TC,ENABLE);
& & & & USART_ITConfig(USART1,USART_IT_RXNE,ENABLE);
& & & & USART_Cmd(USART1,ENABLE);
void GPIO_Config(void)
& & & & GPIO_InitTypeDef GPIO_InitS//声明GPIO_InitStructure& & & &
& & & & GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
& & & & GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
& & & & GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
& & & & GPIO_Init(GPIOA,&GPIO_InitStructure);& & & &
& & & & GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
& & & & GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
& & & & GPIO_Init(GPIOA,&GPIO_InitStructure);
void NVIC_Config(void)
& & & & NVIC_InitTypeDef NVIC_InitS
& & & & NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
& & & & NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
& & & & NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
& & & & NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
& & & & NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
& & & & NVIC_Init(&NVIC_InitStructure);& & & &
&&* @brief&&Main program.
&&* @param&&None
&&* @retval None
int main(void)
&&/*!& At this stage the microcontroller clock setting is already configured,
& && & this is done through SystemInit() function which is called from startup
& && & file (startup_stm32f10x_xx.s) before to branch to application main.
& && & To reconfigure the default setting of SystemInit() function, refer to
& && & system_stm32f10x.c file
& &&&*/& &&&
& & & & RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1|RCC_APB2Periph_GPIOA|RCC_APB2Periph_AFIO, ENABLE);
&&/* Add your application code here
& &USART_Config();
& &GPIO_Config();
& &NVIC_Config();
& &Delay(307);
& & & & for(i = 0;i & 8; i ++)
& & & & & & & & while(USART_GetFlagStatus(USART1,USART_FLAG_TC)==RESET);
& & & & & & & & USART_SendData(USART1,TX_Buf);
&&/* Infinite loop */
&&while (1)
这是调通之后的程序, 奇怪了!&&波特率不对,难道是晶振的问题? 我的芯片是STM32F103ZET6&&晶振用的是8MHZ!
公益广告:广告只能发在本论坛的广告区,否则将封锁ID。
晶振的宏定义要修改,你改了么?
你看下有一个头文件里会根据具体型号选择晶振的,不过我只知道105的不是8M,你这个型号,我没注意到
请问晶振的宏定义要修改成多少?&&不是这个么?
#if !defined&&HSE_VALUE
#ifdef STM32F10X_CL& &
&&#define HSE_VALUE& & ((uint32_t)) /*!& Value of the External oscillator in Hz */
&&#define HSE_VALUE& & ((uint32_t)8000000) /*!& Value of the External oscillator in Hz */
#endif /* STM32F10X_CL */
#endif /* HSE_VALUE */
请问还有哪个参数没设置对?& &为什么波特率还是减半!&&外部晶振是8M,然后宏定义里面的晶振频率也是8M&&,是哪出问题了呢?
我在72M下跑串口1貌似没问题哦 也是3.5库+115200
看下 system_stm32f10x.c中晶振有没配对.还有启动文件选的是不是合适容量.
对! 果然是system_stm32f10x.c中的问题,我的宏定义是STM32F10X_HD_VL,然后把这个宏定义改成STM32F10X_HD就OK了! 呵呵,谢谢各位的帮忙,&&现在波特率正常了!
(原文件名:1.jpg)
(原文件名:2.jpg)
MARK学习了
请教:楼主用的是查询法,若要是用中断法,则在3.5库里面如何设置NVIC的优先级
学习,现在用3.5库,也是出现不少的问题,简单发送都不行
我现在发现自己移植的3.5库printf不能用,不知道什么情况。
谢谢分享,我也是在弄这一块,学习了
谢谢,非常有参考价值!
阿莫电子论坛, 原"中国电子开发网"

我要回帖

更多关于 stm32固件库v3.5 的文章

 

随机推荐