当前位置:网站首页>2837xd code generation module learning (2) -- ADC, epwm module, timer0
2837xd code generation module learning (2) -- ADC, epwm module, timer0
2022-07-02 09:55:00 【Quikk】
2837xd Code generation module learning (2)——ADC、ePWM modular 、Timer0
Model links : link
1 ADC modular
Model structure :
The above structure has been completed ADC collection , The process of outputting the collected voltage .
1)ADC Acquisition module


2)SCI_A See the article for the collection configuration of ( link )
3)Configuration Parameters Middle configuration ADC( Configure as needed )

Here's to say ,2837x Of ADC Acquisition comparison 28335 Of ADC There are changes . Generally speaking, I think it is more convenient to use , For specific usage, please refer to the user manual or TI Teaching video ( link )
Experimental results :

2 Timer0 interrupt
Timer0 Interrupt is the basic timing of simulation step , Therefore, starting and changing the simulation time can trigger Timer0 interrupt .Timer1 and Timer2 Do not belong to PIE interrupt , Therefore, the interrupt service function module cannot be driven , At present, there is no way to start , I feel that I need to use the code generation module . Let's put this question first , Later, we will have an in-depth understanding .
3 ePWM The module configuration
Simple module configuration :

ePWMLink TBPRD Is to link this parameter to ePWM1, If selected as ePWM1, Then represent TBPRD Parameters and ePWM1 Same parameters for .Timer period units You can choose PRD Is the unit of clock cycle or second ( The range of seconds is 0 To 65535*1/(ePWM Clock cycle ) within ).
And then in Configuration Parameters Complete parameter configuration :
2) Deadband mode configuration :

These parameters correspond to the contents of the user manual , You can find the user manual and set it part by part .
3) Interrupt mode configuration

Break and SOC The opening is shown in the figure above ET Module .
Here's the picture , structure ePWM Interrupt test model :

ePWM1 Of TBPRD Set to 10000, The interruption is in CTR=0 Trigger when . That is, every 0.0001 Seconds triggers an interrupt . At the top of the GPIO In steps (0.5 s) Flashing . stay ePWM The following sub functions are built in the interrupt service program of , intend 10000 Time ePWM Interrupt triggers once GPIO Flip (1 second ). As shown in the picture : The sub module here uses Trigger Subsystem. Trigger Modules can be set to : Rising edge 、 Falling edge trigger, etc . You can also use StateFlow Compiling ( At present, I am not very familiar with , Try later )
There is a small problem in debugging today , The model is stored in Path of Chinese Directory Next , An error is reported directly after running for a time , Generated ccs The program also Unable to open . In the future, we must pay attention to placing it in Execute under the English directory .

边栏推荐
猜你喜欢

Alibaba cloud SLS log service

Idempotent design of Internet API interface

MySQL default transaction isolation level and row lock

2837xd 代码生成——补充(1)

Vs+qt set application icon

The latest progress and development trend of 2022 intelligent voice technology

In SQL injection, why must the ID of union joint query be equal to 0

Error reporting on the first day of work (incomplete awvs unloading)

Required request body is missing: (cross domain problem)

Creation and jump of activity
随机推荐
Required request body is missing: (cross domain problem)
Required request body is missing:(跨域问题)
Alibaba / popular JSON parsing open source project fastjson2
JDBC review
C语言之数据插入
c语言编程题
Record the interesting process of using Xray for the first time
C语言之判断直角三角形
每天睡觉前30分钟阅读_day3_Files
How to use PHP spoole to implement millisecond scheduled tasks
Because of hard work, the fruit goes with fate
C language programming problems
上班第一天的报错(Nessus安装winpcap报错)
滲透測試的介紹和防範
Image recognition - data annotation
在SQL注入中,为什么union联合查询,id必须等于0
保存视频 opencv::VideoWriter
Typora安装包分享
Mobile mall app solution: how much is it to make an app? Detailed explanation of APP mall development content
虚幻——动画蓝图、状态机制作人物走跑跳动作