TC397 EB MCAL开发从0开始系列 之 [13.1] Dma配置实战 -实现M2M数据传输(读存储写存储)


-> 返回总目录-<

一、Dma配置

1、配置目标

使用TC397 KIT,使用TC397 EB MCAL开发从0开始系列 之 [16.1] UART配置 - POLLING 模式 收发数据中的串口log日志功能,利用DMA将数据从一个存储空间搬运到另一个存储空间。大家可以先去学习下UART的配置,再来看该章节配置。

2、目标依赖

2.1 硬件使用

使用DMA通道0,1,这里可以随便设置,为了方便展示,使用两个通道验证。

2.2 软件使用

使用TC397 EB MCAL开发从0开始系列 之 [16.1] UART

MCAL配置之SPI、DMA、ICU模块及源码分析 介绍MCAL中的SPI、DMA和ICU模块关键配置分析和相关源码解读 阅读详情

相关推荐

【TC397第17篇】深入嵌入式系统之旅 | 解锁 TC397 EB MCAL DMA配置的独门技巧

通过本文,我们深入研究了TC397 EB MCAL开发系列中DMA配置的一部分,专注于实现M2M数据传输的关键技巧。通过详细的代码示例和案例分析,希望读者能够更好地理解和应用DMA配置,提升嵌入式系统的开发效率和性能。在未来的文章中,我将继续分享更多关于嵌入式系统开发的内容,涵盖更广泛的主题,助力开发者在这个领域取得更大的成就。敬请期待!

一直在水些技术小文 675

TC397从0搭建AUTOSAR开发环境 之 EB MCAL系列讲解 - 总目录

欢迎大家订阅《TC397从0搭建AUTOSAR开发环境 之 EB MCAL系列讲解》,本系列文章专注于基于TC397从0搭建MCAL开发环境,集成编译,并在开发板上运行,中间过程编译及都会展现出来,方便大家后续遇到问题可以纠错,形成纠察清单。用基本的原理和配置操作,通过理论结合实践,把MCAL及AUTOSAR开发过程全过一遍,深入理解MCAL及AUTOSAR。温馨提示:如有疑问,可以在评论给小编留言进行技术交流。后续根据需要决定是否创建交流群。待后续… 订阅后可获取对应章节配置资料,欢迎大家订阅!

yy九歌的博客 9810

MCAL知识点(十二):IRQ中断系统驱动配置详解

IRQ即为中断模块,中断请求既可以由cpu处理,也可以由DMA模块处理。中断请求在本文档中被称为“服务请求”而不是“中断请求”,因为它们可以由任何一个服务提供者提供服务。TC27x中的中断系统是在中断路由器模块中实现的,该模块包括服务请求节点(srn)中断控制单元(ICUs)和用于软件开发支持的附加功能。Tc275的中断单元如下图所示每个SRN包含一个服务请求控制寄存器(SRC)来配置服务请求,例如优先级,映射到一个可用的服务提供者。

梦想技术家 1967

关于tresos Studio(EB)的MCAL配置之DMA

如果SPI驱动程序在中断模式下工作,必须为指定的Rx DMA通道启用DMA Rx通知。通知的名称必须是Spi_Dspi_IsrRxDma_DSPI_X,其中X是使用的DSPI单元的索引。必须使能DMA通知,名称为Adc_Adcdig_DmaTransferCompleteX,其中X是ADC单元的索引。如果使用2个DSPI,我们需要在DMA Logical Channels定义6个DMA通道。如果DMA使用轮询仲裁,则对Aux通道和发送通道之间没有优先级的限制。在逻辑通道里面选择DMA通道,优先级。

qiu421的博客 919

关于tresos Studio(EB)的MCAL配置之ADC

首先得看你的芯片有多少ADC的硬件,譬如我用的芯片有2个ADC硬件组,每组27通道。然后看配置的框图,心里知道大概有些什么可以配置。

qiu421的博客 4194

【MCAL】AUTOSAR架构下SPI数据异步DMA收发具体实现

AUTOSAR架构下SPI数据异步DMA收发具体实现

qq_36056498的博客 1万+

TC3XX - MCAL知识点(二十八):HSSL Mcal配置及代码实战(高速串行链路)

HSSL是五根线的数据通信HSSL模块提供单个数据值和称为流的大数据块的点对点通信。通信设备可以是复杂的微控制器,或者一个微控制器和一个只有基本执行能力的设备。有四个通道来传输单个值到/从目标。它们支持从启动器直接写入8/16/32位数据到目标寄存器,以及从目标读取值,由模块内部主机在目标端执行。为了传输大数据块,有一个包含fifo的通道。HSSL模块完成传输层任务,并将数据移交给另一个模块,该模块提供数据链路层和物理层服务,数据序列化和传输。所有传输都受到CRC和超时等安全功能的保护。

梦想技术家 2049

MCAL SPI配置

用的是Qspi0SpiDriver要配置 4个选项SpichannelSpiJobMcu 模块配置dma配置。

不断debug,优化中…… 468

三菱FX5U通信之CCLINK操作步骤

11. 连接 CC‐Link 用的端子排,连接 Ver.1.10 对应 CC‐Link 专用电缆。备注:1、以上对应的寄存器都是一一对应的,主站的点数可以比从站多,但是都需要一一对应起来。3.直接安装孔,用于直接安装的螺钉孔(2‐φ4.5,安装螺钉为 M4 螺钉)2.点阵 LED(显示模块中设置的站号和测试模式的内容)5.次段扩展连接器(连接扩展模块的扩展电缆的连接器)4.动作状态(显示 LED 显示模块的动作状态)10 电源连接器,用于连接电源电缆的连接器。1.扩展电缆(扩展时连接用的电缆)

ZXL622722的博客 6901

保姆级教程:用NovAtel Inertial Explorer 8.7搞定GNSS/INS紧组合后处理(附避坑指南)

本文提供NovAtel Inertial Explorer 8.7的GNSS/INS紧组合后处理全流程教程,涵盖环境准备、数据转换、基站坐标解算及紧组合处理等关键步骤。特别针对零基础用户,分享实用技巧和常见陷阱,帮助高效完成高精度组合导航数据处理,适用于测绘、自动驾驶等领域。

weixin_42614269的博客 270

Surface Go 2 变身 Linux 开发本:保姆级 Ubuntu 20.04 双系统安装与驱动配置全攻略

本文详细介绍了如何将 Surface Go 2 变身为高效的 Linux 开发本,涵盖 Ubuntu 20.04 双系统安装、专用内核配置、驱动优化等全流程。通过 linux-surface 内核安装和硬件驱动优化,确保 Surface Go 2 的触控、笔输入、摄像头等功能完美运行,适合开发者打造便携生产力工具。

weixin_30596165的博客 611

Arduino、ESP32驱动AS3935数字闪电传感器(闪电传感器)

闪电传感器采用AMS独具创新的AS3935数字闪电传感芯片与Coilcraft的MA5532-AE专用天线,可在室内或室外,安全地检测方圆40km范围内发生闪电的距离,闪电相对强度与统计闪电发生次数。

不脱发的程序猿 1996

搭建ROS小车真的难吗?

搭建ROS小车真的难吗?不难 1.引言 本着为大家谋福利的心态,根据自己以往的开发经验,打算写一个从零开始制作一个可以实现地图构建和导航的ROS小车。目前某宝上面有很多现成产品,但是我个人认为,一个好的移动机器人开发工程师,应该对机器人的整个流程都能具备维护的能力,然后再深入研究其中一个方向即可。看到网上很少有整个系列的开发教程,看到同学们大多东拼西凑,浪费了不少时间。我就想着利用空余时间,将我本人的开发过程输出给大家。有基础理论、有实际工程代码、有丰富的学习资料,尽最大努力帮大家进入移动机器人的大门。 国

「小白学移动机器人」一个专注分享移动机器人相关知识的公众号! 1万+

【WorkBuddy专栏61】字节的AI打法为什么一直在变——WorkBuddy/CodeBuddy vs 字节Trae/TRAE Work/豆包全维度对比

【WorkBuddy专栏61】字节的AI打法为什么一直在变——WorkBuddy/CodeBuddy vs 字节Trae/TRAE Work/豆包全维度对比

AI人人懂 2605

SpringAI系列 - MCP篇(二) - MCP Server Boot Starter

此处需注意之前的。

罗小爬的技术宝书 1307

多角度模板匹配的模板创建技巧

基于形状的模板匹配多角度创建技巧

manuoo的专栏 3394

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

深度学习工具包 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")

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

上一篇: 【MISRA C 2012】Rule 5.2 在同一作用域和名称空间中声明的标识符应该是不同的
下一篇: 【MISRA C 2012】Rule 5.3 在内部作用域中声明的标识符不能隐藏在外部作用域中声明的标识符
yy九歌
博客等级 码龄11年 476粉丝 51原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

打赏作者

yy九歌

你的鼓励将是我创作的最大动力

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

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

打赏作者

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

抵扣说明:

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

余额充值