Jun 01, 2020
10:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 01, 2020
10:09 PM
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
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
- Tags:
- adc interrupt
- IFX
5 Replies
Jun 02, 2020
06:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 02, 2020
06:01 PM
What device are you using?
Jun 02, 2020
11:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 02, 2020
11:10 PM
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
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
Jun 03, 2020
12:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 03, 2020
12:06 AM
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
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
Jun 04, 2020
05:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 04, 2020
05:35 AM
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).
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).
Jun 10, 2020
04:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 10, 2020
04:22 AM
Dear RValascho
Thank you for detailed answer.
Best regards
Shailendra
Thank you for detailed answer.
Best regards
Shailendra
This widget could not be displayed.