Infineon CCU6 Interrupt 1 Скачать руководство пользователя страница 11

References

More code examples can be found on the GIT repository:

https://github.com/Infineon/AURIX_code_examples

For additional trainings, visit our webpage:

https://www.infineon.com/aurix-expert-training

AURIX™ Development Studio is available online:

https://www.infineon.com/aurixdevelopmentstudio

Use the 

„Import...“ 

function to get access to more code examples.

For questions and support, use the AURIX™ Forum:

https://www.infineonforums.com/forums/13-Aurix-Forum

11

2019-10-17

Copyright © Infineon Technologies AG 2019. All rights reserved.

Содержание CCU6 Interrupt 1

Страница 1: ...AURIX TC2xx Microcontroller Training V1 0 0 CCU6_Interrupt_1 CCU6 interrupt generation Please read the Important Notice and Warnings at the end of this document ...

Страница 2: ... T12 of the CCU6 unit generates an interrupt on a period match event every 500 ms Inside the ISR a counter variable is incremented The LEDs toggle based on the value of the counter 1st LED counter 4 0 2nd LED counter 4 1 3rd LED counter 4 2 4th LED counter 4 3 2 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 3: ...e CCU6 unit is made up of a Timer T12 Block with three capture compare channels and a Timer T13 Block with one compare channel In this example Timer T12 Block is used Among other features the CCU6 has the capability to generate interrupts when its count reaches a predefined period value 16 bit 3 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 4: ...Hardware setup This code example has been developed for the board KIT_AURIX_TC297_TFT_BC Step 4 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 5: ...methods from the iLLD headers IfxPort h In the setup phase the port pins connected to the LEDs are configured as push pull output mode using the function IfxPort_setPinMode During program execution the LEDs are switched on and off using the function IfxPort_setPinState 5 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 6: ...e generated interrupt by CCU6 It can be a value from 0 to 255 with 0 meaning interrupt is disabled and 255 is the highest priority type of service defines the service provider responsible for handling the interrupt which can be any of the available CPUs or the DMA trigger a structure for configuring the trigger that allows to start Timer T13 in sync with Timer T12 The function IfxCcu6_Timer_initMo...

Страница 7: ...00 Hz 25 MHz fCC6 4 12500000 Hz 12 5 MHz fCC6 8 6250000 Hz 6 25 MHz fCC6 16 3125000 Hz 3 MHz fCC6 32 1562500 Hz 1 5 MHz fCC6 64 781250 Hz 780 KHz fCC6 128 390625 Hz 390 KHz fCC6 256 195312 5 Hz 200 KHz fCC6 512 97656 25 Hz 100 KHz fCC6 1024 48828 12 Hz 50 KHz fCC6 2048 24414 06 Hz 25 KHz fCC6 4096 12207 03 Hz 12 5 KHz fCC6 8192 6103 51 Hz 6 KHz fCC6 16384 3051 75 Hz 3 KHz fCC6 32768 Note Any value...

Страница 8: ...sidered CCU6 clock frequency and period The CCU6 clock frequency can be freely selected as discussed in the previous slide The period value is stored in a 16 bit register which limits its maximum value to 65535 The ISR frequency can then be calculated as fISR CCU6 clock frequency period 1 8 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 9: ...U6 clock frequency 65535 1 10 Hz 655360 Hz Since the maximum value of 65535 for the period cannot be exceeded it is needed to search into the previous table for the nearest lower exact frequency available which is 390625 Hz Taking this value the period can be easily re calculated as period CCU6 clock frequency fISR 1 390625 10 1 39061 Finally selecting these values as period and CCU6 clock frequen...

Страница 10: ...n and flashing the device observe the behavior of the LEDs Check that LEDs D107 D108 D109 D110 1 are blinking in sequence and changing their state every 500 ms 1 10 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 11: ... www infineon com aurix expert training AURIX Development Studio is available online https www infineon com aurixdevelopmentstudio Use the Import function to get access to more code examples For questions and support use the AURIX Forum https www infineonforums com forums 13 Aurix Forum 11 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 12: ...of the product for the intended application and the completeness of the product information given in this document with respect to such application For further information on the product technology delivery terms and conditions and prices please contact your nearest Infineon Technologies office www infineon com WARNINGS Due to technical requirements products may contain dangerous substances For in...

Отзывы: