ATOM and TIM starts at same time and capture ZCD

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

cross mob
kvedaprakash11
Level 1
Level 1
First question asked Welcome!

I would like to detect a ZCD signal. For this i want my TIM to start  a counter which counts ticks at the same time i start my primary side ATOM channel. The TIM shall detect the ZCD which shall stop the counter and resets again when the ATOM starts. This helps in getting the delay between the primary side fet's switching ON and the ZCD getting detected. 

This counter ticks value is my phase shift for the secondary FET's. 

I would like to know is there a way to achieve this: 

1) TIM starts/resets on every ATOM new period

2) Making the counter count ticks and stops when there is an external input like rising edge

0 Likes
1 Reply
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked

Hi kvedaprakash11,

sound like an interesting problem. I suppose your input signal would be externally leveled up (just DC) and your transitions are meant to represent the ZCD then. If I got it right, you want to utilize the GTM to solve the problem. For now you wanna provide a test signal via the ATOM which is physically connect to the TIM in order to capture it.

If I got that wrong, please correct me.

Well, to start with I would need to know the Aurix Generation you are working with. This is because there are different GTM versions (infrastructures) available. Secondly, I would need to know the frequency of your signal. Just to ensure the GTM is able to handle it. In general, you would just need to capture rising and falling edges, or just rising for a whole period, calculate your delays and proceed with the resulting phase shift. If internal latencies for that procedure are very small compared to the expected delay, it might work.

Best,

TBencher

0 Likes