Simulink - Embedded Coder - C2000 - TI320F2837xD - ePWM - Event Trigger

I can choose after how many events a trigger will occur and i can choose at which event a trigger will occur. This seems conflicting to me, because either i can choose after which number event a trigger will occur or i can choose at which event a trigger will occur and not both.
Can somebody explain this to me?

댓글 수: 1

Hi Bernd,
Please can you explain your problem with screen shots.
Regards,
Venkatesh C

댓글을 달려면 로그인하십시오.

 채택된 답변

Bernd Pfeifer
Bernd Pfeifer 2020년 10월 23일

0 개 추천

Hi Venkatesh,
here is a screenshot of the event trigger in the ePWM block of the TMS320F2387xD.
I want to send an interrupt, when the Counter equals to period. So i choose "Counter equals to period". So far so good.
But furthermore i can decide in "Number of event for start of conversion A (SOCA) to be generated" at which event an interrupt occurs (first - fifteenth event). But the interrupt should not depend on the number of the event. It should only occur if the counter equals to zero. I cannot deselect the line "Number of event for start of conversion A (SOCA) to be generated". So far, the best method is to set this line to "fifteenth event". But if one timerperiod has more than 15 events, the block generates an unwanted interrupt. How can i avoid this interrupt? Or am i understanding something wrong?
Regards,
Bernd

댓글 수: 2

It Just means after how many events you want the interrupt to be generated. In this case 'First event' would mean the interrupt would be generated every time 'Counter equals to period'. If you have a 5usec (200KHz) period, you would get interrupt every 5usec. In case you have configured for 'Second event', then alternate instance of 'Counter equals to period' generates interrupt, i.e you would get interrupt every 10 usec, and with '3rd Event' configured every 15 usec so on.. Hope this is clear..
Ahh okay, i thought that every event would count. Now it makes sense. Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

태그

질문:

2020년 10월 22일

댓글:

2020년 10월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by