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.

TMS570LC4357: ADC with PWM trigger

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN, TMDX570LC43HDK

I am trying to enable the AD1EXT_ENA for PWM trigger with with ADC1. What are the configuration for enabling that pin?

I enabled the Channel Selection Register to Enhanced Mode, is there any other configuration?

  • You also need to configure the PINMUX tab in HALCoGen to enable this AD1EXT_ENA to be output. It is not the default function selected to be output on the assigned terminal.

  • Hi Sunil,

    I have enabled the PINMUX as well in the IOMM. Any other configuration I'm missing?

  • Please upload your code for configuring the ADC and the PINMUX registers. Which terminal are you enabling for outputting AD1EXT_ENA?

  • I'm configuring it using TMDX570LC43HDK "Hercules Safety MCU Development Kit TMS570 MCU" in CCS. I have enabled terminal V8 in IOMM.

    In IOMM:

     

    PIN_V8_MULTIPLEX_E PIN_V8; /* PINMMR24[8] to PINMMR24[12] */

    typedef enum PIN_V8_MULTIPLEX

    {

    PIN_V8_MIBSPI3SOMI = 0x01U,

    PIN_V8_AD1EXT_ENA = 0x02U,

    PIN_V8_ECAP2 = 0x20U,

    PIN_V8_DEFAULT = 0x01U

    }PIN_V8_MULTIPLEX_E

     

    In adc.c

     

    /* channel selection */

    ADC->ADGxCHNSELMODECTRL[1].B.ENH_CHNSEL_MODE_ENABLE = 0x0AU;

    ADC->ADGxCHNSELMODECTRL[2].B.ENH_CHNSEL_MODE_ENABLE = 0x0AU;

    ADC->ADGxCHNSELMODECTRL[3].B.ENH_CHNSEL_MODE_ENABLE = 0x0AU;

     

  • You don't need to enable enhanced channel select mode, just enable output of AD1_EXT_ENA on the selected terminal using the PINMUX tab in HALCoGen. I used the V8 terminal, as this is available for output on a LaunchPad header pin.

  • I am triggering ADC1 with PWM signal with a sample sine wave. Can I see the input PWM signal in AD1EXT_ENA ?

    Just enabling the V8 pin should be fine for that?

  • Should I update the Look up table associated with the enhanced channel mode to see output in AD1EXT_ENA?

  • You cannot see the input sine wave on AD1EXT_ENA. AD1EXT_ENA goes High at the start of the sampling period and stays high during the sampling period.

    Please upload a shot of the IOMM registers from the CCS registers window.

  • IOMM 
     Rev 0x4E840102 Module Revision Register [Memory Mapped] 
     DieId0 0x00000000 Die Id Register 0 [Memory Mapped] 
     DieId1 0x00000000 Die Id Register 1 [Memory Mapped] 
     DieId2 0x00000000 Die Id Register 2 [Memory Mapped] 
     DieId3 0x00000000 Die Id Register 3 [Memory Mapped] 
     DevId0 0x00000000 Device Id Register 0 [Memory Mapped] 
     DevId1 0x00000000 Device Id Register 1 [Memory Mapped] 
     BootConfig0 0x00000001 Boot Config Register 0 [Memory Mapped] 
     Kick0 0x00000000 Kicker Register 0 [Memory Mapped] 
     Kick1 0x00000000 Kicker Register 1 [Memory Mapped] 
     ErrRawStatSet 0x00000000 Error Raw Status/Set Register [Memory Mapped] 
     ErrEnaStatClr 0x00000000 Error Enabled Status/Clear Register [Memory Mapped] 
     ErrEna 0x00000000 Error Enable Register [Memory Mapped] 
     ErrEnaClr 0x00000000 Error Enable Clear Register [Memory Mapped] 
     Fault_Addr 0x00000000 Fault Address Register [Memory Mapped] 
     Fault_Stat 0x00000000 Fault Status Register [Memory Mapped] 
     Fault_Clr 0x00000000 Fault Clear Register [Memory Mapped] 
     PINMMR0 0x01010101 Pin Multiplexing Control Register 0 [Memory Mapped] 
     PINMMR1 0x01010101 Pin Multiplexing Control Register 1 [Memory Mapped] 
     PINMMR2 0x01010101 Pin Multiplexing Control Register 2 [Memory Mapped] 
     PINMMR3 0x01010101 Pin Multiplexing Control Register 3 [Memory Mapped] 
     PINMMR4 0x00010101 Pin Multiplexing Control Register 4 [Memory Mapped] 
     PINMMR5 0x00000000 Pin Multiplexing Control Register 5 [Memory Mapped] 
     PINMMR6 0x00000000 Pin Multiplexing Control Register 6 [Memory Mapped] 
     PINMMR7 0x00000000 Pin Multiplexing Control Register 7 [Memory Mapped] 
     PINMMR8 0x01000000 Pin Multiplexing Control Register 8 [Memory Mapped] 
     PINMMR9 0x01010101 Pin Multiplexing Control Register 9 [Memory Mapped] 
     PINMMR10 0x01010101 Pin Multiplexing Control Register 10 [Memory Mapped] 
     PINMMR11 0x01010101 Pin Multiplexing Control Register 11 [Memory Mapped] 
     PINMMR12 0x01010101 Pin Multiplexing Control Register 12 [Memory Mapped] 
     PINMMR13 0x01010101 Pin Multiplexing Control Register 13 [Memory Mapped] 
     PINMMR14 0x01010101 Pin Multiplexing Control Register 14 [Memory Mapped] 
     PINMMR15 0x01010101 Pin Multiplexing Control Register 15 [Memory Mapped] 
     PINMMR16 0x01010101 Pin Multiplexing Control Register 16 [Memory Mapped] 
     PINMMR17 0x01010101 Pin Multiplexing Control Register 17 [Memory Mapped] 
     PINMMR18 0x01010101 Pin Multiplexing Control Register 18 [Memory Mapped] 
     PINMMR19 0x20200101 Pin Multiplexing Control Register 19 [Memory Mapped] 
     PINMMR20 0x01080801 Pin Multiplexing Control Register 20 [Memory Mapped] 
     PINMMR21 0x08010101 Pin Multiplexing Control Register 21 [Memory Mapped] 
     PINMMR22 0x02012001 Pin Multiplexing Control Register 22 [Memory Mapped] 
     PINMMR23 0x01010101 Pin Multiplexing Control Register 23 [Memory Mapped] 
     PINMMR24 0x01010201 Pin Multiplexing Control Register 24 [Memory Mapped] 
     PINMMR25 0x20010101 Pin Multiplexing Control Register 25 [Memory Mapped] 
     PINMMR26 0x04010101 Pin Multiplexing Control Register 26 [Memory Mapped] 
     PINMMR27 0x10010101 Pin Multiplexing Control Register 27 [Memory Mapped] 
     PINMMR28 0x02020102 Pin Multiplexing Control Register 28 [Memory Mapped] 
     PINMMR29 0x02200202 Pin Multiplexing Control Register 29 [Memory Mapped] 
     PINMMR30 0x01020201 Pin Multiplexing Control Register 30 [Memory Mapped] 
     PINMMR31 0x01202002 Pin Multiplexing Control Register 31 [Memory Mapped] 
     PINMMR32 0x20012001 Pin Multiplexing Control Register 32 [Memory Mapped] 
     PINMMR33 0x01010101 Pin Multiplexing Control Register 33 [Memory Mapped] 
     PINMMR34 0x01010101 Pin Multiplexing Control Register 34 [Memory Mapped] 
     PINMMR35 0x10100101 Pin Multiplexing Control Register 35 [Memory Mapped] 
     PINMMR36 0x01010101 Pin Multiplexing Control Register 36 [Memory Mapped] 
     PINMMR37 0x00001010 Pin Multiplexing Control Register 37 [Memory Mapped] 
     PINMMR80 0x02020201 Pin Multiplexing Control Register 80 [Memory Mapped] 
     PINMMR81 0x01020202 Pin Multiplexing Control Register 81 [Memory Mapped] 
     PINMMR82 0x01010101 Pin Multiplexing Control Register 82 [Memory Mapped] 
     PINMMR83 0x01010101 Pin Multiplexing Control Register 83 [Memory Mapped] 
     PINMMR84 0x01010101 Pin Multiplexing Control Register 84 [Memory Mapped] 
     PINMMR85 0x01010101 Pin Multiplexing Control Register 85 [Memory Mapped] 
     PINMMR86 0x01010101 Pin Multiplexing Control Register 86 [Memory Mapped] 
     PINMMR87 0x01010101 Pin Multiplexing Control Register 87 [Memory Mapped] 
     PINMMR88 0x00010101 Pin Multiplexing Control Register 88 [Memory Mapped] 
     PINMMR89 0x01010000 Pin Multiplexing Control Register 89 [Memory Mapped] 
     PINMMR90 0x01010101 Pin Multiplexing Control Register 90 [Memory Mapped] 
     PINMMR91 0x01010101 Pin Multiplexing Control Register 91 [Memory Mapped] 
     PINMMR92 0x01010101 Pin Multiplexing Control Register 92 [Memory Mapped] 
     PINMMR93 0x01010101 Pin Multiplexing Control Register 93 [Memory Mapped] 
     PINMMR94 0x01010101 Pin Multiplexing Control Register 94 [Memory Mapped] 
     PINMMR95 0x01010101 Pin Multiplexing Control Register 95 [Memory Mapped] 
     PINMMR96 0x01010101 Pin Multiplexing Control Register 96 [Memory Mapped] 
     PINMMR97 0x01010101 Pin Multiplexing Control Register 97 [Memory Mapped] 
     PINMMR98 0x01010101 Pin Multiplexing Control Register 98 [Memory Mapped] 
     PINMMR99 0x00010101 Pin Multiplexing Control Register 99 [Memory Mapped] 
     PINMMR160 0x01010000 Pin Multiplexing Control Register 160 [Memory Mapped] 
     PINMMR161 0x02020202 Pin Multiplexing Control Register 161 [Memory Mapped] 
     PINMMR162 0x02020202 Pin Multiplexing Control Register 162 [Memory Mapped] 
     PINMMR166 0x00000002 Pin Multiplexing Control Register 166 [Memory Mapped] 
     PINMMR167 0x01010101 Pin Multiplexing Control Register 167 [Memory Mapped] 
     PINMMR168 0x00010101 Pin Multiplexing Control Register 168 [Memory Mapped] 
     PINMMR169 0x00000000 Pin Multiplexing Control Register 169 [Memory Mapped] 
     PINMMR170 0x01010000 Pin Multiplexing Control Register 170 [Memory Mapped] 
     PINMMR171 0x01010101 Pin Multiplexing Control Register 171 [Memory Mapped] 
     PINMMR172 0x01010101 Pin Multiplexing Control Register 172 [Memory Mapped] 
     PINMMR173 0x01010101 Pin Multiplexing Control Register 173 [Memory Mapped] 
     PINMMR174 0x01010101 Pin Multiplexing Control Register 174 [Memory Mapped] 
     PINMMR175 0x00000101 Pin Multiplexing Control Register 175 [Memory Mapped] 
     PINMMR176 0x00000000 Pin Multiplexing Control Register 176 [Memory Mapped] 
     PINMMR177 0x00000000 Pin Multiplexing Control Register 177 [Memory Mapped] 
     PINMMR178 0x00000000 Pin Multiplexing Control Register 178 [Memory Mapped] 
     PINMMR179 0x00000000 Pin Multiplexing Control Register 179 [Memory Mapped] 

  • I just uploaded a code project on this thread: e2e.ti.com/.../3167293

    You can use that to compare the PINMUX settings required to output AD1EXT_ENA.