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

TRAVEO™ T2G Forum Discussions

txcao
Level 1
Level 1
5 questions asked 10 sign-ins First reply posted

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,

0 Likes
1 Solution
JJack
Level 5
Level 5
50 sign-ins 10 likes received 25 replies posted

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
AS_36
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

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 1
Level 1
5 questions asked 10 sign-ins First reply posted

Hello @AS_36 ,

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
JJack
Level 5
Level 5
50 sign-ins 10 likes received 25 replies posted

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