ADC continuous mode and start-stop mode

Altair Forum User
Altair Forum User
Altair Employee
edited August 2023 in Community Q&A

Hello,
I implemented motor control system using F28335 DSP. I'm having issues with the sampling rate of the ADC output.

In order to test the ADC, I created a simple model (ADC_test.psimsch). PWM switching frequency is 10k. It works fine when ADC mode is continuous. But when I set it to start-stop(8 channel) the sampling rate of the ADC out put is 4 times slow. When start-stop(16 channel) mode is selected, the sampling rate is 8 times slow. Can you please help me to solve this issue. I need to use start-stop(16 channel) for my drive.

Thank you.

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2023

    When I simulate the system, there are no issues. The problem arises only when I test it practically.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2023

    Please post your simulation for review.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2023

    Had you got any solution for this problem, actually i am also getting the same problem.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2023

    @narmada I am facing the same problem have got any solution for it please share,thanks in advance.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2023

    @sssatish
    In the generated project, there is an inline function named PS_ExitAdcIntr at about line 590 in file PSbios.h, the function should be changed as follows:

    inline void PS_ExitAdcIntr(int intrNo, int intrLevel) {
    ADC_TRL2 |= 1 << ((2 - intrNo) * 8 + 6); // Set RST_SEQ1 / RST_SEQ2
    ADC_ST |= 1 << (intrNo + 3); // Set INT_SEQ1_CLR / INT_SEQ2_CLR
    CPU_PIEACK = intrLevel;
    }
    This will solve the issue.