F28335 Timer1 & Timer2 Construction - Using via Simulink
Mostrar comentarios más antiguos
Hello everyone;
Before the question let me introduce my tools;
C2000 board: F28335
Matlab Model : R2017b
Code Composer: CCS7.4
My question is about using CPU Timer1 and CPU Timer 2 options of this dsp via simulink. As you already now, there are 3 cpu timer in F28335(You can see the
the following figure).

But when I build a Simulink model that containes ADC, ePWM, SCI blocks, model creates(configures) only CPU Timer 0. When I examine the examples of matlab I found "Asynchronous Scheduling" model but in that model 2 different ePwm modules are used as timers because they can trigger subsystems via interrupts. However At the end still timer 0 is used for all timing operations. For example the generated code is seen like this:

My question is how can I implement Cpu Timer1 and Cpu Timer 2 in model so that I can get a code output like following code segment: ? I want to config CPU Timer 1 and CPU Timer 2. and also I don't want ePWM blocks as timers or interrupt sources.

Thanks in advance.
Best regards;
Ömer
Respuesta aceptada
Más respuestas (1)
Venkatesh Chilapur
el 22 de Abr. de 2019
0 votos
Hi,
Use of Timer1 and Timer2 may not be possible directly from simulink using modelling approach.
Instead a custom code approach using custom code blocks can be used to configure the timer, setup the ISR routine and write the ISR logic. We have custom code blocks under simulink coder that can help.
Could you please share details on why ePWM module are not used for generating interrupts but CPU timers?
Regards,
Venkatesh C
2 comentarios
omer cakmak
el 26 de Abr. de 2019
Burak Caykenari
el 23 de Oct. de 2020
Editada: Burak Caykenari
el 23 de Oct. de 2020
Ömer Bey Merhaba ,
Bu konuda sormak istediğim sorular var size. Mümkünse yardımcı olup dönüş sağlar mısınız ?
caykenarib@hotmail.com
Çok teşekkürler.
Categorías
Más información sobre Texas Instruments C2000 Processors en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!