How to write to register for TI DSPs?

5 Ansichten (letzte 30 Tage)
Mike Buba
Mike Buba am 24 Nov. 2022
Beantwortet: Antonin am 17 Okt. 2023
I would like to change (i.e., overwrite) the register values (the whole register or single bit) during the code execution. For example, change F28379D ePWM ramp direction or shift the ramp.
How can I write to register in Simulink? I have tried using a Memory Copy block, but I couldn't make it work.
For example, if I want to change the switching frequency: EPwm2Regs.TBPRD or any other register or bit.

Antworten (1)

Antonin
Antonin am 17 Okt. 2023
Hi Mike,
As explained on the following page:
You need to use the Memory Copy block with code symbol and the .all notation.
For example: &EPwm2Regs.TBPRD.all
This will work,
I hope it helps,
Thanks,
Antonin.

Produkte


Version

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by