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.

TMS570LS0432: halcogen help

Part Number: TMS570LS0432
Other Parts Discussed in Thread: RM42L432, , HALCOGEN

Hi All,

i just wanted to know if i can sample 2 or more channels. should the fifo size match the number of channels? what is the pin out of this window? (in the since, enable pin 9 is adc1 what is the physical pin on board). likewise i was looking for a table that relates enable pin number to adc number to physical pin on the board. 

for example, enable pin 0 is which adc pin (while coding) and which is the physical pin on the boa

  • Hi Nishanth AB,
    You can aquire data from 2 or more channels. To do it change FIFO size to number of channels you want to aquire. You can also check 'Enable channel Id in conversion results' to be sure that the given value is for a given channel.
    If you are using Hercules™ TMS570LS0432 / RM42L432 LaunchPad you will find board pinout here:
    www.ti.com/.../spnu612a.pdf
    For example, ADC PIN 0 (in HalCoGen) = header J3, pin 3 on your board.

  • Hi Michal,

    thx for the reply. but when we choose adin[9], we enable pin 9 in halcogen, but write 1U while coding. can you explain how this numbering is done during coding and can you tell me what number to use for adin[0] during coding.

    Thanks and Regards,

    nishanth A B

  • This '1U' is group parameter. Look at adcGetData function description.

    /** @fn uint32 adcGetData(adcBASE_t *adc, uint32 group, adcData_t * data)
    *   @brief Gets converted a ADC values
    *   @param[in] adc Pointer to ADC module:
    *              - adcREG1: ADC1 module pointer
    *              - adcREG2: ADC2 module pointer
    *   @param[in] group Hardware group of ADC module:
    *              - adcGROUP0: ADC event group
    *              - adcGROUP1: ADC group 1
    *              - adcGROUP2: ADC group 2
    *   @param[out] data Pointer to store ADC converted data
    *   @return The function will return the number of converted values copied into data buffer:
    *
    *   This function writes a ADC message into a ADC message box.

    ADC pins you want to use are defined in adcInit() function, (when you do it in HalCoGen).

    If you want to acquire more channels you should use array instead of single value:

    static adcData_t adc_data[2];                     //ADC Data Structure, array for 2 channels
    static adcData_t (*adc_data_ptr)[2] = &adc_data;  //ADC data pointer
    
    // CODE (...)
    
    /* ADC conversion */
    adcStartConversion(adcREG1, adcGROUP1);
    while(!adcIsConversionComplete(adcREG1, adcGROUP1));
    ch_count = adcGetData(adcREG1, adcGROUP1, adc_data_ptr); //Store conversion into ADC pointer
    
    for (ch_i=0; ch_i<ch_count; ch_i++)
    {
          value = (uint16_t)((*adc_data_ptr)[ch_i].value);
          /* do something with value */
    }