Error in using ePWM (TI F28027 LaunchPad) - Error evaluating 'InitFcn' callback of C280x/C2833x ePWM block (mask) 'untitled/ePWM'.

24 次查看(过去 30 天)
I want to measure speed of motor, for that purpose I'm generating interrupt everytime motor makes one revolution. Now to calculate speed, I need to count how many pulses have been produced in specific time period. For this purpose I planned to use timer using ePWM and generating interrupt at every 1 sec. However it seems I cannot generate time dealys more than 1.something mSec (it gave me error). So for test purposes I tried generating pulse of 1mSec period, however I ran into following problem. Please help me in fixing this error. I'm using MATLAB2018a with TI C2000 F28027F LaunchPad which as base frequency of 60Mhz. Here's how error looks
Error
For reference purposes, I'm also attaching screenshots of ePWM configuration if that helps (yeah right, I have no clue what I'm doing wrong, pls help me!)
matlab1blockparas1.png
matlab1blockparas2.png
matlab1blockparas3.png
Also, here's the snapshot of interrupt settings for ePWM1 interrupt.
matlab1hardwareinterruptsettings.PNG
Let me know if you need any more information, moderators may remove information which they think is unnecessary and will rather complicate things than being helpful to future visitors. Thanks in advance.

采纳的回答

Antonin
Antonin 2019-2-19
Hi Deep,
Pick your PWM block from the C2802x library.
The one you are using right now is for a different family of processors.
The blue label in the top right corner of the block should mention C2802x/03x/05x/06x
I hope it helps,
Thanks,
Antonin.
  3 个评论
Michel Malengret
Michel Malengret 2021-11-13
I also have thesame error ( C280x/C2833x ePWM block (mask) does not have a parameter named 'dcah_type2' with F280049C, specified it correctly. Does Mathlab support the Piccolo F280049C)
I have spent many hours trying to no avail !
Aditya Padmanabha
Aditya Padmanabha 2021-11-15
Hi Michel,
The above answer from Antonin is still applicable here. Please use the ePWM block from F28004x library (blue color label on right top corner of block says F2807x/37x/004x). You are tying to use C280x/C2833x block for F28004x which does not work.
Thanks,
Aditya

请先登录,再进行评论。

更多回答(1 个)

ayad
ayad 2024-2-21
I,m also have the same error

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by