Sep 25, 2018
01:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 25, 2018
01:09 PM
Hi
I'm new to Infineon controller and I try to setup a small program.
I like to sample 2 currents at the same time. That should be triggered by a rising or falling trigger of from a CCU8 unit and a compare value.
After conversion of the two currents I need an interrupt for further processing but the adc should also sample 2 input voltages in the mean time when the interrupt is processing.
This 2 values will be read later in the main loop and I don´t want to wait until the whole converstion is done.
And here I need some help to set this configuration up.
Kind regards
René
I'm new to Infineon controller and I try to setup a small program.
I like to sample 2 currents at the same time. That should be triggered by a rising or falling trigger of from a CCU8 unit and a compare value.
After conversion of the two currents I need an interrupt for further processing but the adc should also sample 2 input voltages in the mean time when the interrupt is processing.
This 2 values will be read later in the main loop and I don´t want to wait until the whole converstion is done.
And here I need some help to set this configuration up.
Kind regards
René
3 Replies
Sep 28, 2018
02:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 28, 2018
02:45 AM
Hello René,
I suggest you to use 2 instances of ADC_Measurement_ADV APP and one CCU APP for this purpose.
you can configure it in the first tab as QUEUE instead of SCAN and 2 channels
In the Channel configuration tab you can activate in one instance for Channel_A an interrupt.
In the Sequence plan you can set at position 0 Channel A and position 1 Channel B.
Activate also the wait for Trigger at Channel A.
After connecting the interrupt APP to the Result event of Channel A you have following setup:
A Trigger starting the conversion of 2 Channel_A parallel.
After the conversion is finished an interrupt is called and 2 Channel B conversions are started.
In the interrupt the values vor Channel A are ready, the values for Channel B most probably not.
Nothing else happens until the next Trigger arrives.
With the next Trigger Channel_A and Channel_B are overwritten.
In this configuration Channel_A and Channel_B have the same update rate.
There are other options if this is not required. But I assume is the best option.
Regards
Eric
I suggest you to use 2 instances of ADC_Measurement_ADV APP and one CCU APP for this purpose.
you can configure it in the first tab as QUEUE instead of SCAN and 2 channels
In the Channel configuration tab you can activate in one instance for Channel_A an interrupt.
In the Sequence plan you can set at position 0 Channel A and position 1 Channel B.
Activate also the wait for Trigger at Channel A.
After connecting the interrupt APP to the Result event of Channel A you have following setup:
A Trigger starting the conversion of 2 Channel_A parallel.
After the conversion is finished an interrupt is called and 2 Channel B conversions are started.
In the interrupt the values vor Channel A are ready, the values for Channel B most probably not.
Nothing else happens until the next Trigger arrives.
With the next Trigger Channel_A and Channel_B are overwritten.
In this configuration Channel_A and Channel_B have the same update rate.
There are other options if this is not required. But I assume is the best option.
Regards
Eric
Sep 29, 2018
05:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 29, 2018
05:28 AM
Hi Eric
Thanks for the answer.
But thats not what I need. For motor control I need to sample 2 current values at the same time and not one after another.
Or is it not possible to sample two values with the XMC 1300 oder 1400?
Kind regards
René
Thanks for the answer.
But thats not what I need. For motor control I need to sample 2 current values at the same time and not one after another.
Or is it not possible to sample two values with the XMC 1300 oder 1400?
Kind regards
René
Oct 01, 2018
08:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 01, 2018
08:32 AM
Hi Rene,
If you are using 2 instances of ADC_Measurement_ADV you can measure 2 inputs at the same time.
Just connect both ADC Apps to the same trigger.
To avoid the Errata ADC_CM01 you can set in "Sync. conversion" Tab the "Synchronised groups" to 1 Slave (@XMC1300/1400).
It is not required to enable any sync master (Channel) and the appearing Table.
Best Regards
Eric
If you are using 2 instances of ADC_Measurement_ADV you can measure 2 inputs at the same time.
Just connect both ADC Apps to the same trigger.
To avoid the Errata ADC_CM01 you can set in "Sync. conversion" Tab the "Synchronised groups" to 1 Slave (@XMC1300/1400).
It is not required to enable any sync master (Channel) and the appearing Table.
Best Regards
Eric