当前位置:网站首页>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 .
边栏推荐
- 上班第一天的报错(AWVS卸载不彻底)
- 2837xd代码生成模块学习(1)——GPIO模块
- Image recognition - data annotation
- Introduction to go language
- Image recognition - Data Acquisition
- 因上努力,果上随缘
- C语言之到底是不是太胖了
- The latest progress and development trend of 2022 intelligent voice technology
- 攻防世界-Web进阶区-unserialize3
- Because of hard work, the fruit goes with fate
猜你喜欢
Typora安装包分享
Image recognition - data augmentation
2837xd代码生成模块学习(4)——idle_task、Simulink Coder
Idempotent design of Internet API interface
阿里云ack介绍
How to install PHP in CentOS
Summary of demand R & D process nodes and key outputs
How to use pyqt5 to make a sensitive word detection tool
Image recognition - Data Cleaning
c语言编程题
随机推荐
【UE5】AI随机漫游蓝图两种实现方法(角色蓝图、行为树)
C language strawberry
Bugkuctf-web21 (detailed problem solving ideas and steps)
cmake的命令-官方文档
Save video opencv:: videowriter
Image recognition - data annotation
Bugkuctf-web24 (problem solving ideas and steps)
Ckeditor 4.10.1 upload pictures to prompt "incorrect server response" problem solution
int与string、int与QString互转
How to install PHP in CentOS
图像识别-数据标注
C语言之最小数
C language: making barrels
Web security and defense
2837xd代码生成模块学习(4)——idle_task、Simulink Coder
College Students' CET-4 and CET-6 composition template (self created version, successfully crossed CET-6)
Memories of a chat
阿里云SLS日志服务
Image recognition - Data Cleaning
2837xd code generation - stateflow (2)