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.

CCS/MSP430F5529: MSP430F5529 OFS_UCBxCTL1 meaning

Part Number: MSP430F5529

Tool/software: Code Composer Studio

Hello ,

I am just getting starting to deal with mcus and I was doing some studuying about a projekt and I came up to this line

 OFS_UCBxCTL1

I know that  UCBxCTL1 is a register but I cannot understand what trhe OFS_ stands for

If anzone can help ..

thank zou

  • Hello Nick,

    Looking at DriverLib examples, there are several USCI peripherals with similar register structure and content. Therefore a specific peripheral's base address is passed to a function (that could be used by all USCIs) so that the corresponding registers can be modified properly through the use of an offset value (OFS). For example, the base address of USCI_B0 is 0x05E0, so if we would like to modify UCB0CTL1 (which so happens to be the first register and is located at 0x05E0) then we need an offset (OFS_UCBxCTL1) of 0x00. 0x06 for UCBxBRW, 0x0A for UCBxSTAT, and so on. Of course you should not need to modify the DriverLib functions, just provide the base addresses, so this should not greatly affect your code.

    Regards,
    Ryan
  • Hello Ryan,

    Thank you very much for your answer it really helped.
    I have studied the driverLib files and most of the .c and .h files in order to understand how to code the MSP430 mcus.
    When I came upon that OFS I searched the libraries because I thought I would see it somewhere to get attached or defined to a value (like the USCI_BASE for example) but I could not find it defined in anz file so I could not understand what is its value so therefore I didnot know what it was usefull for.

**Attention** This is a public forum