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

cross mob
notfust
Level 1
Level 1
5 replies posted 5 sign-ins First like given

Hi!

I use the CCU6 timer in my project, as in the example "CCU6_ADC_1 for KIT_AURIX_TC397_TFT" , but instead of one ADC Group, I use eight. I assigned each one as a master, and for each one I specified "IfxEvadc_TriggerSource_0" (everything is as in the example). Also in the interrupt handler, I measure the time to see the actual sampling rate (the time it takes for the counter to reach the sampling rate value). For one Group at any sampling rate (taking into account that the period of timers T12 and T13 does not exceed 65535), the time takes 1 second (if you just run the code from the example), but if I use two Groups, the time is halved to 0.5 seconds (that is, the frequency is doubled?), if I use four Groups, then by the same analogy, the time is reduced fourfold (to 0.25 seconds) and so on. At the moment, I don't understand the documentation well, and I can't explain this behavior in any way. I need eight Groups (each with one Channel) to convert values at the same time, and I tried to implement this using CCU6. I tried to assign one Group as a master and the others as slave, but the result was only on the Channel of the Master Group.

How to make ADC Groups work synchronously correctly? I don't have a task to use only CCU6, it just seems to be the most convenient for me right now.

I am working with a custom board with an AURIX TC397X chip. At the moment, the eight analog inputs (receiving the signal I'm working with) for the ADC are divided into eight Groups.

0 Likes
3 Replies
Kunqiao_L
Moderator
Moderator
Moderator
First comment on blog First like given 25 likes received

Hi,

You could do parallel conversion without jitter for 4 ADC kernel each time, and one of them acted as master. For 8 ADC kernels you just separate them to two. Two groups trigger by the same hw signal .

Be aware that by default they use the same channel number, so the alias feature could be involved

There are some previous answer I had before:

Can-we-do-Parallel-conversion-together-for-primary-and-secondary-cluster/td-p/401732 

How-to-configure-the-two-ADC-to-sample-simultaneously-in-TC357-with-iLLD-API/td-p/662828 

 

0 Likes

Thanks for the answer, but it didn't help me. Most likely, I'm missing something when initializing the ADC. Did I understand correctly that in order for the ADC to work synchronously, I need to change the values in certain registers myself? That is, to specify parameters not in IfxEvadc_Adc_Config (or IfxEvadc_Adc_GroupConfig and so on), but immediately in registers?
It would be ideal if you explained with code examples.

0 Likes
Kunqiao_L
Moderator
Moderator
Moderator
First comment on blog First like given 25 likes received

Hi,

For all module, group, channel related register changes would finally changed in the function IfxEvadc_Adc_initModule,  IfxEvadc_Adc_initGroup,  IfxEvadc_Adc_initChannel. 

 

You can change the register by yourself, but suggestion would be customized config change + calling those APIs  as code example below.

Kunqiao_L_0-1706686710885.png

For how to do the parallel conversion I suggestion read the user manual 32.11.1 with combination of all existing code example we provide in the github:

code_examples 

 

0 Likes