ADC Hardware trigger problem

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

cross mob
lock attach
Attachments are accessible only for community members.
txcao
Level 3
Level 3
10 replies posted 50 sign-ins First solution authored

Hello everyone,

I am facing problems during using ADC trigger procedure by TCPWM.

I used the example code from "Using a SAR DAC in Traveo T2G" guide but still can't get the ADC conversion via PWM hardware trigger. (No problem with Software trigger)

EVM board: CYTVII-B-E-1M-176-CPU

txcao_0-1671775345601.png

I have no idea what else I can check to solve the problem

txcao_1-1671775373882.png

Please help me to check If I am doing something wrong.

Thanks and BRs,

1 Solution
lock attach
Attachments are accessible only for community members.
JJack
Level 5
Level 5
Associated Partner - Distributor Rutronik
5 questions asked 25 likes received 100 sign-ins

Hi txcao,

 

on first glance, I also don’t see why your code is not running as expected. This is why

I tried to write my own and attached the result.

TCPWM0_GRP1_CNT0 is running as PWM-timer with ~1s period and 1/4s duty. The LED4 on the CYTVII-B-E-SK is flashing in this rhythm. The ADC is triggered from TCPWM via the trigger multiplexer and the conversion result is output via semihosting. Because the PWM is so slow you can easily see the synchronicity of the timing of LED and ADC result on screen.

Regards

JJack

View solution in original post

0 Likes
3 Replies
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi @txcao 

Please elaborate more on your observation. What do you mean by "can't get the ADC conversion"? What is the issue that you are facing?

Have you tried the ADC code example available on this link? - https://softwaretools.infineon.com/tools/com.ifx.tb.tool.traveoiisampledriverlibrarycodeex

Regards.

0 Likes
txcao
Level 3
Level 3
10 replies posted 50 sign-ins First solution authored

Hello @Apurva_S ,

I am using SDL ver 7.7.

I have tested the OneChannelConversion _SWtrigger and confirm that ADC conversion works normally using the SW trigger. I am facing a trigger problem when changing it to HW trigger (PWM).
It can't get into the AdcIntHandler(void) at the up and down edges of PWM during debugging.

txcao_0-1671786575346.png

Regards,

0 Likes
lock attach
Attachments are accessible only for community members.
JJack
Level 5
Level 5
Associated Partner - Distributor Rutronik
5 questions asked 25 likes received 100 sign-ins

Hi txcao,

 

on first glance, I also don’t see why your code is not running as expected. This is why

I tried to write my own and attached the result.

TCPWM0_GRP1_CNT0 is running as PWM-timer with ~1s period and 1/4s duty. The LED4 on the CYTVII-B-E-SK is flashing in this rhythm. The ADC is triggered from TCPWM via the trigger multiplexer and the conversion result is output via semihosting. Because the PWM is so slow you can easily see the synchronicity of the timing of LED and ADC result on screen.

Regards

JJack

0 Likes