- In a blank Simulink model, under the “HARDWARE” tab in the Simulink toolstrip, open PREPARE> Hardware Settings
- In the dialog box that opens, set Hardware Implementation > Hardware board to “Infineon AURIX TC4x – TriBoards”.
- Include the “PWM” block in the Simulink model from the Embedded Coder Support Package for “Infineon AURIX TC4x” Microcontrollers.
- Double click on the block to launch the block parameters dialog box and navigate to Parameters > Advanced.
- Here, the field “Number of channels” indicates the number of hardware channels that can be driven by the “PWM” block. For more details about this parameter, refer to the following link - https://www-integ1.mathworks.com/help/releases/R2025a/ecoder/infineonaurix/ref/pwm.html#:~:text=Number%20of%20channels%20%E2%80%94%20Select%20required%20channels
- Once the number of channels are set, follow the workflow as described in the following link to map the channels to the hardware pins on the TC4x target - https://www-integ1.mathworks.com/help/releases/R2025a/ecoder/infineonaurix/ug/map-tasks-peripherals-ifx.html
Using Embedded code to generate bootable code- Aurix TC4x
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I came across the BSP blockset available for Aurix TC4xx.
it has blocks for several peripherals and interfaces.
My query is as follows
- to use for example the PWM block, to drive 2 separate channels, we will have to place two instances of the PWM block and configure the channel in each instanace. is this correct.
- to generate code for the used PWM blocks, how to go about? Will it give me a single file with code for both blocks ?
- As per my understanding the BSP will work with the eval board. So, can we generate the entire bootlable code from SImulink? Will it directly integrate the startup code, the compiler/linker tool chain etc. and generate the hex file directly from Simulink so that it downloads to target and can be tested.
Kindly let me know.
Thanks
Archit
0 个评论
回答(1 个)
Raghava S N
2024-9-3
Hi Archit,
Regarding your first query, the “PWM” block in the Embedded Coder Support Package for “Infineon AURIX TC4x” Microcontrollers can drive multiple channels simultaneously. This can be done as follows –
With regards to your second query, Embedded coder generates code on a model level. So, the number of files generated as artefacts of code generation is independent of the number of blocks included in the model. A detailed description of the files created as the output of code generation by embedded coder can be found in the following link - https://www.mathworks.com/help/ecoder/ug/build-process-files.html.
Coming to your final query, Embedded Coder Support Package for “Infineon AURIX TC4x” Microcontrollers enables you to generate a real-time executable file and download it to your “Infineon AURIX TC4x” Microcontroller. The support package includes a library of Simulink blocks that you can use to configure and access Infineon AURIX TC4x Microcontrollers peripherals and communication interfaces. Refer to the following link which describes the workflow used to program and run Simulink models on “Infineon AURIX TC4x” Microcontrollers - https://www-integ1.mathworks.com/help/releases/R2025a/ecoder/infineonaurix/ug/getting-started-led-example.html.
Hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with SoC Blockset Support Package for Infineon AURIX Microcontrollers 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!