XMC1300 CCU8 starts ADC

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User15782
Level 1
Level 1
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é
0 Likes
3 Replies
Eric1
Employee
Employee
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
0 Likes
User15782
Level 1
Level 1
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é
0 Likes
Eric1
Employee
Employee
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
0 Likes