Borrar filtros
Borrar filtros

Using Embedded code to generate bootable code- Aurix TC4x

5 visualizaciones (últimos 30 días)
Archit
Archit el 23 de Ag. de 2024
Respondida: Raghava S N el 3 de Sept. de 2024
Hi,
I came across the BSP blockset available for Aurix TC4xx.
it has blocks for several peripherals and interfaces.
My query is as follows
  1. 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.
  2. to generate code for the used PWM blocks, how to go about? Will it give me a single file with code for both blocks ?
  3. 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

Respuestas (1)

Raghava S N
Raghava S N el 3 de Sept. de 2024
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 –
  1. In a blank Simulink model, under the “HARDWARE” tab in the Simulink toolstrip, open PREPARE> Hardware Settings
  2. In the dialog box that opens, set Hardware Implementation > Hardware board to “Infineon AURIX TC4x – TriBoards”.
  3. Include the “PWM” block in the Simulink model from the Embedded Coder Support Package for “Infineon AURIX TC4x” Microcontrollers.
  4. Double click on the block to launch the block parameters dialog box and navigate to Parameters > Advanced.
  5. 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
  6. 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
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!

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by