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.

TMS570LS0714: ADC code for TMS570LS12x not working on TMS570LS0714

Part Number: TMS570LS0714
Other Parts Discussed in Thread: HALCOGEN

Hello,

We are moving known working code from the Hercules Launchpad TMS570LS12x to a custom TMS570LS0714-based board.  The ADC values on the custom board all read 0x7FF (1/2 of full scale in 12 bit mode).  The sections on the ADCs in the TRMs appear identical.  I wondered if we had missed something. 

Thanks!

Stephen

  • Update: I generated two bare-metal halcogen projects for the LS1224PGE, and the LS0714PGE.  I setup both projects identically, generated the code, and added test code to main().  I compiled and launched a debug session for both projects on the x0714.  I saw many conversion complete events.  But, all conversions are 0 in both cases for all channels.  When I run either project on the Launchpad, I see noisy conversions (between 0x500-0xB00) on all channels.  We're grasping at straws here.  Any intuition would be much appreciated! 

    Thanks!

    Stephen

    Halcogen modifications:

    TMS570LSx > VIM Channel 0-31  -- enabled RTI Compare 0, ADC1 Event, ADC Group1 IRQs. 

    ADC1 > ADC1 Group Event > Trigger Source --  RTI_COMP0, enabled pins 0-3. 

    ADC1 > ADC1 Group 1  --  enabled pins 4-7

    Test code (in sys_main.c):

    /* USER CODE BEGIN (2) */
    adcData_t gAdcData[32];
    uint32 sAdcCheckTimeoutCount=0;
    uint32 sAdcCheckSuccessCount=0;
    uint32 sTotalConversions=0;

    int CheckConversion(adcBASE_t *adcBase, uint32 group, adcData_t *adcData) {
        if(!adcIsConversionComplete(adcBase, group)) {
            sAdcCheckTimeoutCount++;
            return 0;
        }

        sAdcCheckSuccessCount++;
        return adcGetData(adcBase, group, adcData);
    }
    /* USER CODE END */

    int main(void)
    {
    /* USER CODE BEGIN (3) */
        rtiInit();
        adcInit();
        vimInit();

        vimEnableInterrupt(2, SYS_IRQ);
        vimEnableInterrupt(14, SYS_IRQ);
        vimEnableInterrupt(15, SYS_IRQ);

        rtiEnableNotification(rtiNOTIFICATION_COMPARE0);
        rtiStartCounter(rtiCOUNTER_BLOCK0);

        _enable_interrupt_();

        adcStartConversion(adcREG1, adcGROUP0);
        adcStartConversion(adcREG1, adcGROUP1);

        while(1) {
            sTotalConversions += CheckConversion(adcREG1, adcGROUP0, gAdcData);
            sTotalConversions += CheckConversion(adcREG1, adcGROUP1, gAdcData);
        }
    /* USER CODE END */

        return 0;
    }

  • My apologies. We have found an issue with the custom board.
  • Stephen,

    No issues or reason to apologize. This is why its called "product development." We learn and progress through our discoveries whether they are intentional or not! I am glad you were able to find your issue.