This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28388D: ADCSOCBO always high

Part Number: TMS320F28388D

Hello everyone,

I want to trigger an extern ADC via the ADCSOCBO on GPIO10. The PWM1B triggers this SOC and an interrupt. The interrupt works correctly so I think the EPWM1B is configured correctly. The problem is that the GPIO10 which is configured as ADCSOCBO is always high.

The GPIO is configured as follows: 

   GPIO_setPinConfig(GPIO_10_ADCSOCBO);
   GPIO_setPadConfig(10, GPIO_PIN_TYPE_STD);
   GPIO_setQualificationMode(10, GPIO_QUAL_ASYNC);

Configuration of the ADC trigger and the interrupt: 

   uint8_t const adcSocPRD2 = 5u; // Each 5 event -> 50kHz PWM -> controller/regulation frequency = 10kHz
   uint16_t const ePWMPeriodNominal = kHz2PRD(pwmFreqKHz, 1.f) - 1u; // 50 kHZ; Up Mode -> TPWM = (TBPRD + 1) x TTBCLK

   EPWM_enableADCTrigger(EPWM1_BASE, EPWM_SOC_B); // Enable SOC
   EPWM_setADCTriggerSource(EPWM1_BASE, EPWM_SOC_B, EPWM_SOC_TBCTR_U_CMPD); // Enable event: time-base counter equal to CMPD when the timer is incrementing
   EPWM_setADCTriggerEventPrescale(EPWM1_BASE, EPWM_SOC_B, adcSocPRD2); // Each 5 events -> 50kHz PWM -> controller/regulation frequency = 10kHz
   EPWM_setCounterCompareShadowLoadMode(EPWM1_BASE, EPWM_COUNTER_COMPARE_D, EPWM_COMP_LOAD_ON_CNTR_ZERO);
   EPWM_setCounterCompareValue(EPWM1_BASE, EPWM_COUNTER_COMPARE_D, ePWMPeriodNominal / 2u); // Set SOC delay relative to rising edge of 1b PWM (oszi used to find out the time point for both modes)
   Interrupt_register(INT_EPWM1, &soc_extern_adc_isr);


The ADCSOC output is configured as follows:

	SysCtl_setSyncOutputConfig(SYSCTL_SYNC_OUT_SRC_EPWM1SYNCOUT);
	//
	// SOCA
	//
	SysCtl_enableExtADCSOCSource(SYSCTL_ADCSOC_SRC_PWM1SOCA);
	//
	// SOCB
	//
	SysCtl_enableExtADCSOCSource(SYSCTL_ADCSOC_SRC_PWM1SOCB);


Is there anything that I missed configuring to be able to get the right trigger signal on GPIO10?

Greetings,
Loic