MSPM0-SDK: DL_ADC12_initSeqSample implementation issue

Part Number: MSPM0-SDK


DL_ADC12_initSeqSample is implemented as following 
__STATIC_INLINE void DL_ADC12_initSeqSample(ADC12_Regs *adc12,
    uint32_t repeatMode, uint32_t sampleMode, uint32_t trigSrc,
    uint32_t startAdd, uint32_t endAdd, uint32_t resolution,
    uint32_t dataFormat)
{
    DL_Common_updateReg(&adc12->ULLMEM.CTL1,
        (ADC12_CTL1_CONSEQ_SEQUENCE | repeatMode | sampleMode | trigSrc),
        (ADC12_CTL1_SAMPMODE_MASK | ADC12_CTL1_CONSEQ_MASK |
            ADC12_CTL1_TRIGSRC_MASK));

    DL_Common_updateReg(&adc12->ULLMEM.CTL2,
        (startAdd | endAdd | resolution | dataFormat),
        (ADC12_CTL2_ENDADD_MASK | ADC12_CTL2_STARTADD_MASK |
            ADC12_CTL2_RES_MASK | ADC12_CTL2_DF_MASK));
 
I'm strongly believe that line  (startAdd | endAdd | resolution | dataFormat)
missing '<<' for startAdd, endAdd and resolution as startAdd << 16 | endAdd<<24 | resolution<<1 | dataFormat
 
please advise.
(as a sidenote - why Add not Addr?)
 
  • Mykhaylo:

    Sorry for the late response. Somehow this thread is missed in e2e forum.

    I'm strongly believe that line  (startAdd | endAdd | resolution | dataFormat)
    missing '<<' for startAdd, endAdd and resolution as startAdd << 16 | endAdd<<24 | resolution<<1 | dataFormat

    This offset is added in the hw_adc12.h:

    B.R.

    Sal