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.

TMS320F28P550SJ: ADCD can not read D11

Part Number: TMS320F28P550SJ
Other Parts Discussed in Thread: SYSCONFIG

I have D11 assigned to the SOC0 conversion on ADCD. It is selected in the ADC PinMux and does not cause an error in SysCfg. I verified that there is an analog voltage at the pin 22. Also, I am able to read D16 on SOC2 so I know that the ADCD is being read. 

Is there any reason why it should not be able to be read?

Thanks

Dennis

  • Hi Dennis,

    ADCDIN11 is a valid external channel on the 100-pin LQFP (PZ) package, on pin 22. Because this pad is an AGPIO-type analog pin, two things must be true or the ADC won’t see your signal: connect the analog path for that pad (set the corresponding AGPIOCTRL bit = 1); and keep the pin in analog mode (leave GPxAMSEL bit = 1).

    Also double-check that CMPSS1’s low-DAC-to-pin output is not enabled. ADCDIN11 shares the pad with CMP1_DACL; if that output is driven to the pin, the pad becomes a DAC output and your external voltage won’t be measurable by the ADC.

    Best regards,

    Masoud

  • Masoud,

    The board.c file is generated automatically by sysconfig.

    Here is the generated code for pin 232.

    // Analog PinMux for A1, B7, D11, CMP1_DACL
    GPIO_setPinConfig(GPIO_232_GPIO232);
    // AIO -> Analog mode selected
    GPIO_setAnalogMode(232, GPIO_ANALOG_ENABLED);
    Here is the code generated for CMPSS1.
    SysCtl_setPeripheralAccessControl(SYSCTL_ACCESS_CMPSS1,
    SYSCTL_ACCESS_CPU1, SYSCTL_ACCESS_FULL);
    SysCtl_setPeripheralAccessControl(SYSCTL_ACCESS_CMPSS1,
    SYSCTL_ACCESS_CLA1, SYSCTL_ACCESS_FULL);
    SysCtl_setPeripheralAccessControl(SYSCTL_ACCESS_CMPSS1,
    SYSCTL_ACCESS_DMA1, SYSCTL_ACCESS_FULL);
    SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS1);
    Please explain if that is correct or I need to add some external programming to main.c in addition to what's in board.c. 

    Thanks

    Dennis

  • Hi Dennis,

    Can you temporarily disable CMPSS1 for that pad (or redirect it off) to ensure the pad isn’t acting as a DAC output. if CMPSS1 has its low-DAC-to-pin output enabled, the pad becomes a DAC output rather than an analog input to the ADC.

    Other than that I would double check to make sure that the SOC0 correctly configured, triggered and has the result register being read.

    If you share a short version of SysConfig, I can check it out on my side.

    Best Regards,

    Masoud

  • Masoud,

    I deleted the DAC from SysConfig and turned off the CMPSS clocks. The signal still doesn't read but it also does not short out like it did before. There are 3 signals on ADCD and the other two work fine. I can send you my sysconfig file if you want.

    Is there anything else I can do?

    Dennis

  • I sampled a P55 Launch Pad and once I get the board I'll do a simple to to recreate the issue and get back to you.

    Best Regards,

    Masoud

  • Hello,

    I just tested ADC-D11 on LP-F28P55x and it's working as expected. I'm attaching the sample project for your reference. You can simply run the code and watch the "myADC1Results" in watch window.

    Best Regards,

    Masoud

    ADC_D11_test.zip

  • Masoud,

    The test worked. I will go ahead and see why my code does not.

    Thanks

    Dennis