infineon4engi@twitter infineon4engineers infineon@linkedin infineon@youtube
twitter Facebook Linkedin Youtube

Product Release Webinar Banner_Aurix_Competition Banner_AURIX_Security-Solution Banner_AURIX_Safety_Products ShieldBuddy TC275 Banner_AURIX_OnzerOS Banner_AURIX_DevelopmentStudio


+ Reply to Thread
Results 1 to 6 of 6

Thread: ADC interrupt example

  1. #1
    Beginner Beginner Shailendra is on a distinguished road
    Join Date
    Apr 2020
    Posts
    12
    Points
    105

    ADC interrupt example

    Hello All

    Can someone provide me a reference to an example in which ADC calculation complete triggers an interrupt?
    Also I was looking for an example where ADC used for more than 4 channels (e.g. 10)

    Thank you.

    Best regards
    Shailendra

  2. #2
    Advanced Advanced cwunder will become famous soon enough
    Join Date
    Feb 2015
    Location
    USA
    Posts
    215
    Points
    4287.5
    What device are you using?

  3. #3
    Advanced Advanced
    Infineon Employee
    Infineon Employee
    teoBits is on a distinguished road
    Join Date
    Nov 2019
    Posts
    58
    Points
    990
    Hello Shailendra,

    you can try the CCU6_ADC example, it is triggering an interrupt at every measure to read the conversion and print it on the terminal!
    here you can find the tutorial: CCU6_ADC tutorial

    hope it helps,
    teoBits
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  4. #4
    Beginner Beginner Shailendra is on a distinguished road
    Join Date
    Apr 2020
    Posts
    12
    Points
    105
    Dear teoBits

    Thank you for providing me the referene.
    As I understand, the interrupt is generated upon completion of conversion.
    Is there any way to generate interrupt when conversion crosses a certain threshold value?

    I am getting analog value but I wanted to treat it like digital line.

    Best regards
    Shailendra

  5. #5
    New Member New Member
    Infineon Employee
    Infineon Employee
    RValascho will become famous soon enough
    Join Date
    May 2012
    Location
    Michigan, USA
    Posts
    26
    Points
    153.330078125
    Hi Shailendra,

    You can do this. In the case of a result completion, this is probably done by via a source event or a result event. But in the case of a boundary condition, you need to use a channel event. These are the 3 types of events available ISR flags in our ADC. To set this up, you need to set up a boundary condition. There are 2 global boundaries (GLOBBOUND) available, and 2 group boundaries for each group (GxBOUND) available. Configure your digital result boundary in one of these registers. Next, you need to locate the specific CHCTR register that is tied to the physical channel. You need to tell the channel which boundary conditions, from previous, to look at for upper (BNDSELU) and lower (BNDSELL) boundaries. Select upper and/or lower boundaries. Then, all ADC service requests are a two step setup. You need to enable the event first. CHCTR.CHEVMODE will enable the flag, and it is configurable as an option to your boundary condition. Now you have the boundaries and the flag, but we need to choose a generic service request to target a core service. In the CEVNP0 register, for the specific channel (all channels have 4 bit field) and specific group, you can then tie a specific service request to this boundary event. There are 4 group specific request lines, and 4 general request lines. Once you tie the channel event to a specific service request node, this now maps to a specific SRC_VADC... (register) node where you can configure the type of service (TOS), Priority (SRPN Vector entry), and enable the interrupt(SRE).
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  6. #6
    Beginner Beginner Shailendra is on a distinguished road
    Join Date
    Apr 2020
    Posts
    12
    Points
    105
    Dear RValascho

    Thank you for detailed answer.

    Best regards
    Shailendra

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.