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.

MSP430F6775A: Registers

Part Number: MSP430F6775A
Other Parts Discussed in Thread: MSP430F6775

Tool/software:

I would like to assure myself about whether when there is access byte in the register like in case of that screen. And  I will access it as a word like *(int*)(0x0020) than ? Will I also access the data  on the address 0x0021? and it will be returned as MSB and LSB in one word? Or not?

  • When you do a word read the lsb of the address is a don't care. The hardware will always treat it as a zero. Returning both bytes in one word. So these both return the same value:

       mov.w  &0xca0,r15
       mov.w  &0xca1,r15
       

    You will have to be careful with the compiler provided bit definitions. If they assume byte access then with word access they will not work unless you adjust them.

    Some registers have two sets of bit definitions to allow for both byte and word access. Check the device header file.

  • Hi Peter,

    I recommend following David's advice.

    Best Regards,

    Diego Abad

  • Hi,

    Where are those definitions? I mean some macro definition name or so .

  • From msp430f6775.h:

    /* RTCTCCTL0 Control Bits */
    #define TCEN                   (0x0001)       /* RTC Enable for RTC Tamper Detection with Time Stamp */
    #define AUX3RST                (0x0002)       /* RTC Indication of power cycle on AUXVCC3 */
    
    /* RTCTCCTL1 Control Bits */
    #define RTCCAPIFG              (0x0001)       /* RTC  Tamper Event Interrupt Flag */
    #define RTCCAPIE               (0x0002)       /* RTC Tamper Event Interrupt Enable */
    
    

**Attention** This is a public forum