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.

PRU-ICSS-INDUSTRIAL-SW: AM437x, Sigma Delta Code running in PRU

Part Number: PRU-ICSS-INDUSTRIAL-SW

Hi,

can somone explain me this code

#ifdef ADC_SDDF

void Read_ADC_Samples(void)
{
    unsigned long u;
    float v;

    u = sd_get_cur_sample(sd, 3); /* SD7 */
    v = ((float)u - 1048576.0) / 1048576.0;
    Data_In[0] = v * 2.5;

    u = sd_get_cur_sample(sd, 2); /* SD6 */
    v = ((float)u - 1048576.0) / 1048576.0;
    Data_In[1] = v * 2.5;
}
#else /* ADC_SDDF */

Why is sd_get_cur_sample(sd, 3) SD7 ?

Why is sd_get_cur_sample(sd, 2) SD6 ?

why calculation for variable v?

Why a multiplication with 2.5 ?

Any more documentation available ?

Thank you