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.

TMS570LS12 Reading Conversion Results Directly

Dir Sir,

I try to read ADC1 Group 1 result from Conversion Result Memory.

===================================================

ADC : SETTING

BNDA = 8U;

BNDB = 16U

adcREG1->GxSEL[0U] = 0x000000FFU;

===================================================

Please let me know which registers should read it.

0xFF3E0000 => ADCIN[0],  0xFF3E0004 => ADCIN[01],  0xFF3E0008 => ADCIN[02] ...

or 

0xFF3E0000 +  BNDA =>  ADCIN[0], 0xFF3E0004 +  BNDA =>  ADCIN[01],  0xFF3E0008 +  BNDA =>  ADCIN[02]...

or 

0xFF3E0000 +  BNDA*4 =>  ADCIN[0], 0xFF3E0004 +  BNDA*4 =>  ADCIN[01],  0xFF3E0008 +  BNDA*4 =>  ADCIN[02] ...

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

SPNU15 p880 ~p882 is very tough for me to understand.

Thanks!   

  • Hi Jeong,

          Thanks for your post.

          According you requirement, you can read below address to get your ADC Group1 Results:

          0xFF3E0000 +  BNDA*4*2 =>  ADCIN[0], 0xFF3E0004 +  BNDA*4*2 =>  ADCIN[01],  0xFF3E0008 +  BNDA*4*2 =>  ADCIN[02] ...

          Because the number of buffers is double based on BNDA and BNDB.

         But I recommend you to use the ADC FIFO to get your result. It's more convenient and you don't need to know the detailed value of address and registers. 

         Hope that this may help you. Thanks

         Best Regards,
         Shelford



  • Good answer Shelford,

    I'll just add that you can make the Channel # appear in the MSBs of the data when you read the FIFO.

    The register bit to do this is bit 5 of each of the group operating mode registers (ADEVMODECR, ADG1MODECR, ADG2MODECR).

    When this bit is set, the channel # is written to the upper bits of the returned result,  so each time you read data from the FIFO you can

    be sure that you know which channel it came from.  

    Probably this isn't wanted for production code but it could help become familiar with how the FIFO mode works especially if coming from an A/D with direct mapped registers.

    -Anthony