- Check if the "CMPA units" in the ePWM block is "Clock cycles" or "Percentages". If it is in "Percentages" ensure 0.2 is the input to the "WA" port of the ePWM block to obtain 20% duty cycle. If it is in "Clock cycles" ensure that 20% of the "Timer period" value of the ePWM block is provided.
- Ensure that 2 volt which is sent to the ADC pin computes for 20% of 4095. You can do that by finding the board specification for ADC pin sensible voltage limit.
- Verify if the ADC is sensing the analog voltage. You can do that by ensuring the "Conversion channel" of the ADC block matches to the pin where the input voltage is provided.
F28335 带 ADC 中断的 10kHz PWM信号生成
5 views (last 30 days)
Show older comments
首先,我按照案例 ADC-PWM Synchronization Using ADC interrupt 中Simulink模型进行操作。编译后送入28335开发板。
此处,我仅将原本gain中的5,改为了3*7500/(4095*10),因为我希望产生一个占空比为20%的10kHz的PWM信号
硬件连线上,我将2v直流电压接在开发板ADC采样部分(图中红色方框位置),GPIO0作为ePWM1A输出。
但是,28335似乎没有产生PWM信号。
这里在ADC和中断的配置上都没有进行改动。是否是连接上的问题?
此处采用的是R2019a 和 ccs6 进行的工程
0 Comments
Answers (1)
Sayan
on 15 Sep 2023
Edited: Sayan
on 9 Oct 2023
我会用英语回答这个问题。I understand from your issue that when the value of Gain block is changed in the example to obtain 10kHz PWM with 20% duty ratio the desired output is not found in the output pin of the F28335 board. The possible reasons of the issue and their fixes are mentioned below:.
Further details on the ADC block can be found in the following MATLAB documentation:
希望这有助于解决问题。
0 Comments
See Also
Categories
Find more on C2000 Microcontroller Blockset in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!