Other Parts Discussed in Thread: HALCOGEN
Hi,
I am trying to do analog loop back tests for N2HET.
What I am trying to do is:
1. Generated a PWM on HET[12]
2. Connected HET[12] and HET[13] in analog loop back mode
3. Configured CAP0 to measure the PWM signal on HET[13]
4. Measured the PWM dutycycle and period using the function capGetSignal
But I am unable to get the captured signals pwm and dutycycle. Is there any thing I am doing wrong ?
A code snippet of what I am trying to do is posted:
void test_analog_n2het()
{
/* configure LBPDIR[12/13] = 1, HR structure 12 will be output and
* HR structure 13 will be input*/
/* configure LBPTSTENA[16-19] = 0xAh to enable loop back test*/
hetREG1->LBPDIR |= 0x000A0040U;
/* configure LBPSEL[12/13] = 1, HR structures 12 & 13 will be internally connected in loop
back mode.*/
/* configure LBPTYPE[12/13] = 1. This will configure HR structure 12 - 13 in analogue
* loop back mode */
hetREG1->LBPSEL |= 0x00400040U;
}
void measure_cap_signal()
{
capGetSignal(hetRAM1, 0U, &het_signal_capture);
printf("The PWM of captured signal : %f\n", het_signal_capture.period);
}
I have noted the PWM generation on HET[12] is fine.
Can any one please tell me what is going wrong ?
Regard
S