Part Number: TMS320F28379D
Hi everybody,
I'm using the TMDSCNCD28379D controlCARD for a new project, but I have two issues.
First one concerned GPIO in input mode :
- When it's concerning GPIO A or GPIO B, there's no problem (for example, configuring GPIO30 as an input)
GpioCtrlRegs.GPAPUD.bit.GPIO30 = 0; // Enable pullup on GPIO30
GpioCtrlRegs.GPAMUX2.bit.GPIO30 = 0; // Enable GPIO on GPIO30
GpioCtrlRegs.GPADIR.bit.GPIO30 = 0; // Configure GPIO30 as intput
- But when it's concerning GPIO C, I need to disable pullup (for example, configuring GPIO74 as an input)
GpioCtrlRegs.GPCPUD.bit.GPIO74 = 1; // Disable pullup on GPIO74
GpioCtrlRegs.GPCMUX1.bit.GPIO74 = 0; // GPIO74 = GPIO74
GpioCtrlRegs.GPCDIR.bit.GPIO74 = 0; // GPIO74 = input
Is it an hardware issue?
Second thing is not an issue, but a question :
Before, I used a TMS320F2812 ; to have a continuous ADC conversion, I could proceed like this :
- Start a SEQ1 conversion :
AdcRegs.ADCST.bit.INT_SEQ1_CLR = 1;
- Wait for interrupt on EOS (End of sequence) :
while (AdcRegs.ADCST.bit.INT_SEQ1 == 0)
- Clear the SEQ1 interrupt flag bit :
AdcRegs.ADCST.bit.INT_SEQ1_CLR = 1;
- And conversion start again.
Now, with the 28379D, I want to use a software trigger (INT1). I proceed like this :
ADC Configuration :
AdcaRegs.ADCSOC0CTL.bit.CHSEL = 0; // SOC0 will convert pin A0 on ADC-A
AdcaRegs.ADCSOC1CTL.bit.CHSEL = 1; // SOC1 will convert pin A1 on ADC-A
AdcaRegs.ADCSOC2CTL.bit.CHSEL = 2; // SOC2 will convert pin A2 on ADC-A
AdcaRegs.ADCSOC3CTL.bit.CHSEL = 3; // SOC3 will convert pin A3 on ADC-A
AdcaRegs.ADCINTSEL1N2.bit.INT1SEL = 3; // End of SOC3 will set INT1 flag on ADC-A
- Start a conversion :
AdcaRegs.ADCSOCFRC1.all = 0x000F; // SOC3, SCO2, SOC1 & SOC0 are used on ADC-A - Start of conversion
- Wait for interrupt on EOS (End of sequence) :
while(AdcaRegs.ADCINTFLG.bit.ADCINT1 == 0);
- Clear the interrupt flag bit :
AdcaRegs.ADCINTFLGCLR.bit.ADCINT1 = 1; // Acknowledge INT1 flag on ADC-A
- But conversion doesn't start again, I need to use again the instruction :
AdcaRegs.ADCSOCFRC1.all = 0x000F; // SOC3, SOC2, SOC1 & SOC0 are used on ADC-A - Start of conversion
Is it normal? Do I have to start a new conversion each time?
Thanks for your answer.
Regards,