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.

MSP430FR6043: SDHSDTCDA Reset method not working with SDHS unlock registers.

Part Number: MSP430FR6043

I'm capturing data using the SDHS module of USS. The SDHS is configured as "SDHS_REGISTER_CONTROL_MODE". and

"SDHS_ACQUISITION_DONE_INTERRUPT" is enabled so the DTC reset is done in the isr.

SDHSCTL5 is used to start the data conversion.

I want to reset the DTC buffer index to 0 after one time period of capturing data.

The reset is done as follows:

   SDHSCTL4 &= ~(SDHSON);

   SDHSCTL3 &= ~(TRIGEN);

 

   SDHSDTCDA = 0x00;

 

   SDHSCTL3 = TRIGEN_1;

   SDHSCTL4 = SDHSON;

 

   __delay_cycles(320);//settling time before SDHSCTL5.SSTART is set.

But the SDHSDTCDA continuous incrementing and I'm not able to change it to 0.

It is mentioned in the userguide (22.5, page 578, Note 5) that the SDHSDTCDA is unlocked when SDHSCTL4 and SDHSCTL3 are disabled.

 

 

Are there any other registers that need to be disabled to modify SDHSDTCDA register?


Thanks,

karthik

  • Hi Karthik,

    I think you also need to set the SDHSCTL5.SDHS_LOCK bit to 0 then you can write the SDHSDTCDA.

    Best regards,

    Cash Hao

  • The SDHSCTL5.SDHS_LOCK is a Read Only register and it is set to 1 when SDHS is powered up by SDHSCTL4.SDHSON = 1.

    When I verified the registers in the debug mode during the following sequence 

       SDHSCTL4 &= ~(SDHSON);

       SDHSCTL3 &= ~(TRIGEN);

     

       SDHSDTCDA = 0x00;

     

       SDHSCTL3 = TRIGEN_1;

       SDHSCTL4 = SDHSON;

    SDHSCTL3.TRIGEN is never reset to 0. when  SDHSCTL3 &= ~(TRIGEN); is executed. 

    The register values are as follows:

    The SDHSDTCDA value is never reset to 0. and I'm not able to reset the SDHSCTL4.SDHSON and SDHSCTL3.TRIGEN. 

    It is specified that SDHSDTCDA is locked during SDHSCTL3.TRIGEN = 1

    Are there any other flags which needs to be set before I reset SDHSCTL4 and SDHSCTL3?

**Attention** This is a public forum