Clear Filters
Clear Filters

F28335 带 ADC 中断的 10kHz PWM信号生成

14 views (last 30 days)
振坤 熊
振坤 熊 on 16 Dec 2022
Edited: Sayan on 9 Oct 2023
首先,我按照案例 ADC-PWM Synchronization Using ADC interrupt 中Simulink模型进行操作。编译后送入28335开发板。
此处采用的是R2019a 和 ccs6 进行的工程

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:.
  • 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.
Further details on the ADC block can be found in the following MATLAB documentation:

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!