STM32
文章平均质量分 51
ST STM32相关应用
Franklin
工程师
展开
-
Win10 CubeMX 安装java环境,安装不上去的问题解决
运行STM32CubeMX的时候,如果JAVA环境被破坏,会有如下问题: 会自动弹出以下安装地址: 然后,在下载的文件,选择安装: 点击安装后,就没有然后了:网上有建议,更改下面安装文件的属性,笔者的其结果是,还是不弹出安装的窗口: 在: 里面选取, 在执行CubeMX 就可以了:原创 2022-11-16 10:45:32 · 749 阅读 · 0 评论 -
STM32 - 定时器的设定 - 基础 - 05 - Arbitrary waveform generation using timer DMAburst feature - 任意波形的序列产生
DMA的功能不说了,如何产生任意序列的波形,我们仔细看看:本节叙述了同DMA的方法,在不占用MCU资源的情况下,通过提前编辑一组任意定制的波形参数,实现复杂的波形输出。STM32 DMA-burst feature overview The direct memory access (DMA) peripheral is used in order to provide a high...原创 2019-10-11 23:59:20 · 1053 阅读 · 2 评论 -
STM32 - 定时器的设定 -高级- 08 - One-pulse mode - 触发波的实现 - 可变长度和相位
前言:直接开讲,请耐心看完 :首先,OPM模式的波形可以通过主从模式进行触发,其次,OPM模式的波形本身可以进行波形定制。1 OPM定义和功能说明One-pulse mode (OPM) is a particular case of the previous modes. It allows the counter to be started in response to a sti......原创 2019-10-06 15:14:04 · 11319 阅读 · 1 评论 -
STM32 - 定时器的设定 - 基础- 0A - Timers and external trigger synchronization - 定时器和外部触发的同步
四种同步方式:The TIMx Timers can be synchronized with an external trigger in several modes: Reset mode, Gated mode and Trigger mode.1 Slave mode: Reset mode The counter and its prescaler can be reinit...原创 2019-10-08 05:50:29 · 2207 阅读 · 0 评论 -
STM32 - 定时器的设定 - 基础- 0B - Timer synchronization & chaining - 主从模式下 - 定时器同步和级联控制 - 使能控制
The TIMx timers are linked together internally for timer synchronization or chaining. When one Timer is configured in Master Mode, it can reset, start, stop or clock the counter of another Timer confi...原创 2019-10-08 09:24:44 · 832 阅读 · 0 评论 -
STM32 - 定时器的设定 - 基础- 09 - 编码接口 - Encoder interface mode
To select Encoder Interface mode write SMS=‘001 in the TIMx_SMCR register if the counter is counting on TI2 edges only, SMS=010 if it is counting on TI1 edges only and SMS=011 if it is counting on bot...原创 2019-10-08 04:05:01 · 1227 阅读 · 0 评论 -
STM32 - 定时器的设定 - 基础- 0C - Timer synchronization & chaining - 主从模式下 - 定时器同步和级联控制 - 举例:使能2
In the example, we synchronize Timer 1 and Timer 2. Timer 1 is the master and starts from 0. Timer 2 is the slave and starts from 0xE7. The prescaler ratio is the same for both timers. Timer 2 stops w...原创 2019-10-08 10:15:43 · 751 阅读 · 0 评论 -
STM32 - 定时器的设定 - 基础- 0D - Timer synchronization & chaining - 主从模式下 - 定时器同步和级联控制 - 级联启动定时器
和前面两次举例不同的是,前面两次是用CC通道的输出波形来做触发,这个例子,用UEV的发生做触发:In this example, we set the enable of Timer 2 with the update event of Timer 1. Refer to Figure 140 for connections. Timer 2 starts counting from its ...原创 2019-10-08 17:15:59 · 836 阅读 · 0 评论 -
STM32 - 定时器高级应用说明 - 01 - Filtering stage - 波形输入的过滤
Filter Stage 理解为定时器的采样时钟源。Timer inputs (like ETR input or channel inputs) feature a filtering stage that may be activated to filter out external signal pulses with duration less than a desired th...原创 2019-10-09 16:30:46 · 816 阅读 · 0 评论 -
STM32 - 定时器基础-应用说明 - 02 - The preload feature of the timer registers - 预制值和精确同步
The preload feature in the context of the STM32 timer peripheral, refers to the duplication of some timer registers or some timer control bit-fields. As the content of some timer registers and some co...翻译 2019-10-10 07:58:45 · 298 阅读 · 0 评论 -
STM32 - 定时器的设定 - 基础- 0E - Timer clocking using external clock-source - 外部时钟源的使用
Overview The STM32 timer peripherals can be clocked by an external source clock, but it does not mean that the APB (advanced peripheral bus) clock is not required. An STM32 timer peripheral synchron...翻译 2019-10-11 12:36:20 · 2689 阅读 · 0 评论 -
STM32 - 定时器基础应用说明 - 03 - Application: timer clocking using external clock-source on ETR timer input
This application describes one use-case of using an external clock-source to clock the timer peripheral. 本应用用外部时钟源来做定时器的clock,This application is developed around the external clock-source mode 2 ...翻译 2019-10-11 15:56:38 · 653 阅读 · 0 评论 -
STM32 - 定时器基础应用说明 - 04 - N-pulse waveform generation using one-pulse mode - 用OPM模式产生N次脉冲
前言;N-PULSE模式,就是PLUS模式+Mask(利用UDIS的屏蔽)Repetition的特性;那么首先-N-PULSE可以定制波形的各个方面,然后,将这个定制进行重复,那不就是可以无限的定制出你想要的波形。然后,利用DMA的方式,增加系统的反应时间,那么就基本上变成一个完美的应用。Overview:The one-pulse mode (OPM) of an STM...翻译 2019-10-11 17:21:27 · 1753 阅读 · 2 评论 -
STM32 - 定时器的设定 - 基础- 07 - 6-step PWM generation - 6步长PWM的产生 - COM Event的解释
前言:本节主要讲互补输出的步长设定问题,同时引入了一个重要的参数COM,这个再诸多STM32的手册里面都过于分散,在本文有一个比较完备的小结:When complementary outputs are used on a channel, preload bits are available on the OCxM, CCxE and CCxNE bits. 互补输出主要由以下三个可以...原创 2019-10-06 13:15:07 · 1947 阅读 · 0 评论 -
STM32 - 定时器的设定 - 基础- 06 - OCxREF signal - Clearing the OCxREF signal on an external event
OCxREF signal 作为捕捉比较的定制化参考波形在对输出波形的配置上占有巨大的影响。如何将这个信号和外部输入的事件联系起来,能给系统的设计带来更多的可选择性。The OCxREF signal for a given channel can be driven Low by applying a High level to the ETRF(ETRF:External Trigger ...原创 2019-10-06 08:29:23 · 1146 阅读 · 0 评论 -
STM32 - 高级定时器的设定 - 基础-05 - 输出波形控制 -Complementary outputs and dead-time insertion 相位调整@互补输出和死区控制
The advanced-control timers (TIM1 and TIM8) can output two complementary(互补) signals and manage the switching-off and the switching-on instants of the outputs. This time is generally known as dead-tim...原创 2019-10-05 21:59:22 · 2038 阅读 · 0 评论 -
STM32 - CubeMX 的使用实例详细(01)- STM32F103的配置 - GPIO设定
前言,项目需要STMF103的片子做PWM的控制,感觉ST的新版的IDE的配置功能很强大,想用用看。项目采用的是STM32F103C8T61 端口的配置1.1 MCU选型MCU框图可以查阅:然后各种DataSheet完备开始项目后:1.2 MCU配置1.2.1 MCU Pinout&Configuration1.2.1.1 我...原创 2019-08-14 15:08:50 · 3075 阅读 · 1 评论 -
STM32 - CubeMX 的使用实例详细(04.1)- STM32F103的 - 定时器设定详细解释 - PWM波的产生 - 频率占空比的设定 - 软件代码分析
前言:本文详细条例STM32 103定时器的设定1 定时器简介中等容量的STM32F103xx增强型系列产品包含1个高级控制定时器、3个普通定时器,以及2个看门 狗定时器和1个系统嘀嗒定时器。 下表比较了高级控制定时器、普通定时器和基本定时器的功能: 表4 定时器功能比较高级控制定时器(TIM1) 高级控制定时器(TIM1)可以被看成是分配到6个通道的三相PWM发生器,...原创 2019-08-20 09:52:26 · 2821 阅读 · 2 评论 -
STM32 - CubeMX 的使用实例详细(01.1)- ST-LINK V2 的配置
MX很方便,但是,由于自动生成的代码,这样的话,就容易有一些配置冲突,因为选项太多了。ST-LINK V2 的样子:这个版本应该是国内的简化版本:管脚配置应该如下:其实只要连接3根线就可以了然后,MX里面配置应该选串口我们看到其实就是下面两个管脚:经过验证,这样之后生成的代码可以Debugging...原创 2019-08-15 16:42:37 · 3505 阅读 · 0 评论 -
STM32- 定时器的设定 - 二元一次方程的因素分解求解实现PWM和定时器频率的小数位 - Matlab 方法:
前言:做STM32的时候,定时器有两个倍频系数,有时候频率需要精确到小数后面,本例说明如何在小数点后面两位精确:STM31F103的最大频率为7.2000e+07,那么如果要精确到小数点后面两位,也就是我们把这个最大频率扩大100倍,为,7.2000e+09,然后,我们设需要的频率点为一个常量C(已经扩大了100倍成为一个自然数),那么,问题变成,求解二元的因式分解的数学题目了:...原创 2019-08-29 11:34:33 · 578 阅读 · 0 评论 -
STM32F103 - CubeMX 的使用实例详细(04.5)- STM32F103的 - 定时器设定详细解释 - 定时器相关的HAL接口函数 - 定时器的中断
前言:本文介绍STM32 定时器中断控制的HAL 接口定义:1 该驱动接口能实现的主要功能:1.1 有哪些驱动/** ****************************************************************************** * @file stm32f1xx_hal_tim.c * @author MCD Appl...原创 2019-09-05 09:45:47 · 2408 阅读 · 0 评论 -
CubeMX 的使用实例详细(04.6)- STM32F103的 - 定时器设定 - callback调用 - 实现1S的定时更新LED灯
调用HAL来控制定时器,应该是CubeMX必须走的道路:在CubeMX中需要如何设定?如何利用callback来进行调用?如何计算1S的定时1 Timer的定时1.1 CubeMX里面的设定1.1.1 模式和配置1.1.2 参数配置1.1.3 中断设置中断设置必须打开,才能有中断,从而,才能有中断处理,才有中断回调函数的执行。2 call back:i...原创 2019-09-10 16:20:54 · 2247 阅读 · 0 评论 -
STM32 - 定时器高级应用说明 - 多触波的实现 (N-pulse waveform generation using timer synchronization)- 01
前言:如何实现复杂的不同频率、相位、波形脉宽的波形就在这个章节:This application example is split into two parts describing two similar application examples.(两个例子)Both examples use of the inter-timers synchronization to genera...原创 2019-09-21 11:03:14 · 1288 阅读 · 0 评论 -
STM32 - 定时器高级应用说明 - 多触波的实现 (N-pulse waveform generation using timer synchronization)- 02
上一节讲了基础,本节实做:The main features described are: • TIMER 2 is configured as master trigger mode to trig TIMER1 We use TIM2_channel1 on output compare mode to generate PWM1 signal. – APB1 prescale...原创 2019-09-26 10:20:33 · 457 阅读 · 0 评论 -
STM32 - 定时器的设定 - 基础 01.1 - Repetition counter
前言:Repetition counter是一个STM32增强的计数器功能,有很多用途,本文尝试进行简单阐述:我们理解为,就是定时器溢出再增加一个倍率rate 的控制。注意是倍率,也就是如果是定时1S,那么设定N为1,那么就是N+1=2倍Section 14.3.1: Time-base unit describes how the update event (UEV) is genera...原创 2019-10-04 15:49:01 · 5409 阅读 · 0 评论 -
STM32 - 定时器的设定 - 基础 01 - Timer Base - Prescaler description - Upcounting mode
前言:时基是定时器的最基本的功能:本节详细叙述STM32的时基的功能。1Time-base unitThe main block of the programmable advanced-control timer is a 16-bit counter with its related auto-reload register. The counter can count up,...原创 2019-10-04 17:03:52 · 2145 阅读 · 0 评论 -
STM32 - 定时器的设定 - 基础- 02 - Capture/compare channels 和相关设置寄存器 - 和STM32缩写词条解释
前言:捕捉比较通道:STM32丰富的定时器的变化,就在这个模式,所以,复杂是必然的:当然,也可以简单来理解,就是通过选择定时器的输入的配置同时配置定时器的输出来获取我们需要的各种波形:几个重要的缩写的意义:CC: Capture compareCCXE: Capture/Compare xoutput enableCCXNE:Capture/Compare 1 complem...原创 2019-10-05 11:06:09 · 7108 阅读 · 0 评论 -
STM32 - 定时器的设定 - 基础-03 - 输出波形控制 - Output compare mode
1 简介:This function is used to control an output waveform or indicating when a period of time has elapsed. When a match is found between the capture/compare registerTIMx_CCRx and the counter TIMx_AR...原创 2019-10-05 12:22:12 · 2849 阅读 · 2 评论 -
STM32 - 定时器的设定 - 基础-04 - 输出波形控制 - PWM 模式
PWM为诸多应用的基本波形,如何实现和如何定制,首先要了解STM32中PWM的实现方法。在STM32中,PWM的实现主要通过控制OCxRef (active high).:output compared X channel Reference signal来实现。而数据通道则为,CC通道,也就是Capture Compare通道。PWM的设定Pulse Width Modulat...原创 2019-10-05 17:18:45 · 2240 阅读 · 0 评论 -
STM32F103 - CubeMX 的使用实例详细(03)- 时钟配置 - 最大72M时钟的设定
1 STM32F103 的时钟树:从时钟树里面,我们可以看到,最大的时钟周期可以设为72M2 STM32F103的Cube MX设定2.1 如果采用内部时钟,设置最大为64M,如下:我们发现高速外部不能选,如何解决?2.2 外部高速选择原因:是RCC没有设置按照设定如下;现在我们回到:clock configure是因......原创 2019-08-18 23:31:18 · 10615 阅读 · 4 评论