当前位置:网站首页>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 .

边栏推荐
猜你喜欢

Share a blog (water blog)

The latest progress and development trend of 2022 intelligent voice technology

2837xd 代码生成——总结篇

YOLO物体识别,生成数据用到的工具

Skywalking theory and Practice

Image recognition - Data Cleaning

每天睡前30分钟阅读Day6_Day6_Date_Calendar_LocalDate_TimeStamp_LocalTime

图像识别-数据采集

Operation and application of stack and queue

【UE5】AI随机漫游蓝图两种实现方法(角色蓝图、行为树)
随机推荐
个人经历&&博客现状
2837xd 代码生成——补充(3)
Image recognition - Data Acquisition
Record personal understanding and experience of game console configuration
上班第一天的报错(AWVS卸载不彻底)
C语言之到底是不是太胖了
Thinkphp5 how to determine whether a table exists
Typora installation package sharing
Required request body is missing:(跨域问题)
图像识别-数据采集
滲透測試的介紹和防範
C language strawberry
XA Transaction SQL Statements
Illusion -- Animation blueprint, state machine production, character walking, running and jumping action
Matlab生成dsp程序——官方例程学习(6)
TD联合Modelsim进行功能仿真
Mobile mall app solution: how much is it to make an app? Detailed explanation of APP mall development content
int与string、int与QString互转
Skywalking theory and Practice
Beats (filebeat, metricbeat), kibana, logstack tutorial of elastic stack