STM32单片机:时钟系统之时钟源(STM32L4xx)

第4课【STM32的时钟】时钟 时钟源 内外部时钟 高低速时钟 目录基本知识框架课堂笔记时钟什么是时钟?时钟有什么作用时钟源HSE 外部高速时钟HSI 内部高速时钟LSE 外部低速时钟LSI 内部低速时钟PLL锁相环主要时钟和其他时钟主要时钟其他时钟配置系统时钟实验基本知识框架Xmind文件下载 基本知识框架 课堂笔记 时钟 什么是时钟?时钟有什么作用 时钟是STM32内部最核心的器件,它可以提供时钟信号。依赖于这个信号,STM32中的器件才可以有条不紊地将工作进行下去。正如人类的脉搏一般。 时钟源 STM32中能够主动发出时钟信号的元器件,可以用作时钟源。STM32 阅读详情

本文介绍STM32单片机的时钟系统,STM32单片机型号种类繁多,各个系列的时钟系统都有其各自的特点,本文针对的是STM32L4xx系列的型号来介绍,以后陆续会介绍其他系列的时钟系统。

时钟源分为内部时钟和外部时钟两部分,单词首字母是其简称:

内部时钟源:

LSI:        Low Speed Internal                           内部低速时钟

LSI是一个低功耗的RC振荡器,在3V供电温度30摄氏度时,其频率范围是31.04kHz - 32.96kHz之间,这个低功耗的震荡器可以通过电池供电,所以可以在停止或待机模式下给独立看门狗IWDG,RTC和段式LCD提供时钟。

HSI16:   High Speed Internal  16MHz              内部高速时钟

STM32时钟树 2.HSI时钟(高速内部时钟):来源为芯片内部,大小为8M,当HSE故障时,系统时钟会自动切换到HSI,知道HSE启动成功,相当于HSE的替补。9.MCO时钟输出 :来源为PLLCLK/2、HSE、HSI、SYSCLK,微控制器时钟输出引脚,由PA8复用所得。8.RTC时钟:来源为HSE_RTC(HSE分频得到)、LSE、LSI,为芯片内部的RTC外设提供时钟。4.SYSCLK(系统时钟):来源为HSI、HSE、PLLCLK,最高速度为72M。高总线时钟):来源为HCLK分频得到,速度最高为。 阅读详情

相关推荐

STM32中五个时钟源:HSI、HSE、LSI、LSE、PLL

晶振是时钟电路中最重要的部件,它的主要作用是向显卡、网卡、主板等配件的各部分提供基准频率,它就像个标尺,工作频率不稳定会造成相关设备工作频率不稳定,自然容易出现问题。数字电路的工作是根据电路设计,在某个时刻专门完成特定的任务,如果没有一个时序控制的标准时刻,整个数字电路就会成为“聋子”,不知道什么时刻该做什么事情了。另一种为外部方式,时钟信号由外部引入。由于STM32的外设很多,有的外设不需要太高的时钟频率,同一个电路,时钟越快功耗越大,同时抗电磁干扰能力也越弱,所以对于较为复杂的MCU一般都是采取。

ddidi111的博客 4494

STMicroelectronics 系列:STM32L4 系列_(11).STM32L4系列的时钟系统

STM32L4系列单片机的时钟系统非常灵活,支持多种时钟源和分频配置。通过合理配置时钟树,可以确保系统在不同应用场景下高效稳定地运行。时钟配置可以通过STM32CubeMX工具自动生成代码,也可以手动编写代码来完成。手动配置时需要特别注意各个寄存器的设置,确保时钟源的正确选择和分频参数的合理配置。同时,时钟故障检测功能也是确保系统可靠性的关键部分,建议在实际应用中启用。希望本文能帮助您更好地理解和配置STM32L4系列单片机的时钟系统。如有任何问题或需要进一步的帮助,请随时联系。

2401_87715305的博客 1027

STM32L4xx_Nucleo基于RS485通信的温度湿度模拟系统

STM32L4xx系列是STMicroelectronics推出的一系列高性能、低功耗的微控制器,基于ARM® Cortex®-M4内核,并具备丰富的外设集成。特别是STM32L4xx_Nucleo开发板,作为ST官方提供的开发平台,使得开发者可以更加便捷地进行嵌入式系统设计、原型开发和功能测试。RS485是一种差分信号的串行通信协议,被广泛用于长距离和高速数据传输的场景。它的最大优势在于其高抗干扰能力和远距离传输能力,这得益于其采用的差分信号传输方式,可以有效地消除噪声干扰。

weixin_35756690的博客 965

STM32L496实现RTC实时时钟【HAL库驱动,支持STM32L4系列单片机】.zip

STM32L496驱动程序,HAL库驱动。 支持STM32L4系列单片机编译和运行。 项目代码可顺利编译运行~

避坑指南:SpringBoot对接拉卡拉支付常见问题与解决方案(含SDK 1.0.6配置技巧)

本文是一份SpringBoot项目对接拉卡拉支付的实战避坑指南。针对SDK 1.0.6版本,详细剖析了从依赖管理、多环境配置、SDK初始化到支付请求构建、回调验签及生产监控的全流程常见问题,并提供了经过验证的解决方案与配置技巧,旨在帮助开发者高效、稳定地集成支付功能。

k5l6m的博客 330

28377D Bootloader

架构

a6100309120的博客 6013

adams案例分析_案例1(麦弗逊悬架子系统创建)

本文字数3292字83图,建议阅读时间26分钟首先看下案例1的麦弗逊悬架数模结构就不细讲了,从数模上主要是获取硬点坐标(铰接点、安装点、参考点)及大部件结构(副车架、摆臂、转向节等实际运动过程中会产生变形的部件,在ADAMS Car中我们就可以用柔性体来搭建)再来回顾下上一篇讲到的模型元素1、Hardpoint——硬点(只有位置没有方向)2、Parameter Variable——参数...

weixin_39609407的博客 6476

Unity3d SECTR 2019 从零开始了解(零)

插件刚下载下来,虽然从Demo里面看了下大致效果,但尝试使用的时候茫无头绪,因此决定一边读文档一边写下笔记。这个笔记会从最基本的名词概述开始一步一步到用法。 除非特别注明,所有内容都不是机翻,而是理解后自己翻译的。 翻译内容: 【零】API REFERENCE MANUAL第一章Documentation Core Concept 【一】 名词概述 CORE CORE是SECTR的核心,一个快速将 Sectors 和 Portals 加入到Unity中的工具,以及完整的源代码,可以构筑独特的功能。 VI

狗蛋在土里瑟瑟发抖 1501

智能车图像处理去畸变+逆透视教程

图像处理,去畸变与逆透视整合

wu58430的博客 1万+

王者荣耀AI绝悟如何选英雄?

王者荣耀AI绝悟如何选英雄? 【抢射手?抢中单位?「绝悟」在打王者荣耀时是如何选英雄的?】 腾讯 AI Lab 开发的 AI 智能体「绝悟」已让王者峡谷不再只是人类召唤师的竞技场,而且这个 AI 战队在上月底进化成了「完全体」。在一局完整的比赛中,英雄选择阶段是至关重要的(比如五射手或五法师阵容会有官方劝退)。 近日,腾讯 AI Lab 和上海交通大学发布的一篇论文介绍了绝悟的英雄选择策略:Ju...

不断学习,不断进步,提高自己 1万+

c#仿热血江湖

Int32_1 = (int) table.Rows[i]["FLD_初级附魂"],Int32_2 = (int) table.Rows[i]["FLD_中级附魂"],Int32_3 = (int) table.Rows[i]["FLD_是否绑定"],Int32_0 = (int) table.Rows[i]["FLD_进化"],Form1.smethod_1(2, "加载百宝阁物品----没有百宝阁数据");Form1.smethod_1(2, "加载物品商店----没有物品数据");

weixin_42132177的博客 143

lammps剪切模拟的三种实现方法

本文介绍了LAMMPS分子动力学模拟中三种剪切方法:fix deform全局盒子剪切、速度边界剪切和外力加载剪切。fix deform通过改变盒子形状实现均匀剪切,适合宏观力学参数计算;速度边界剪切通过固定边界原子施加速度模拟非均匀剪切,适合界面摩擦研究;外力加载剪切则通过施加恒定力研究材料屈服行为。文章详细说明了每种方法的适用场景、核心原理和关键命令,并强调应根据具体研究目标选择合适方法。这些方法为金属、聚合物等材料的剪切模拟提供了实用解决方案,可直接套用文中命令进行建模计算。

lammps_jiayou的博客 66

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

上一篇: STM32单片机:GPIO编程
下一篇: STM32单片机:LSE(外部低速时钟)的编程(STM32L4xx)
btzhy
博客等级 码龄17年 67粉丝 28原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

btzhy

您的鼓励是我最大的动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值