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.

MSP430F6997 Sigma delta ADC conversion parameters

Other Parts Discussed in Thread: MSP430F6779

Hello,

I want to know the initialization parameters of SD24 ADC.

I have tried SD24_B_init(0x0800,SD24_B_CLOCKSOURCE_MCLK | SD24_B_PRECLOCKDIVIDER_1 | SD24_B_CLOCKDIVIDER_1 | SD24_B_REF_INTERNAL));

is it correct way?

Address should contain h? (e.g.(0x0800h) 

Thanks 

Regards,

Abhishek

  • Isn't there any documentation about these functions? If so, can provide a link? I never used them.

    Dennis
  • software-dl.ti.com/.../sd24__b_8h_source.html

    This is hex file 

    and function is like

    void SD24_B_init(uint16_t baseAddress,
    SD24_B_initParam *param)
    {
    // Reset all interrupts and flags
    HWREG16(baseAddress + OFS_SD24BIE) &= 0x0000; //Reset ALL interrupt enables
    HWREG16(baseAddress + OFS_SD24BIFG) &= 0x0000; //Reset ALL interrupt flags
    HWREG16(baseAddress + OFS_SD24BTRGCTL) &= ~(SD24TRGIE | SD24TRGIFG);

    // Turn off all group conversions
    HWREG16(baseAddress + OFS_SD24BCTL1) &= ~(SD24GRP0SC | SD24GRP1SC
    | SD24GRP2SC | SD24GRP3SC);

    // Configure SD24_B
    HWREG16(baseAddress + OFS_SD24BCTL0) &= ~((SD24DIV4 | SD24DIV3 | SD24DIV2
    | SD24DIV1 |
    SD24DIV0) | SD24PDIV_7 |
    SD24SSEL_3 | SD24REFS);
    HWREG16(baseAddress + OFS_SD24BCTL0) |= (param->clockSourceSelect |
    param->clockPreDivider |
    param->clockDivider |
    param->referenceSelect);

    return;
    }

    I want to pass arguments to this function as mentioned in my question. 

    So was it the correct way to pass the base address and other arguments?

    Thanks 

    Regadrs

    Abhishek

  • Thanks!

    Another thing first: There is no MSP430F6997 - do you mean MSP430F6779?

    Dennis
  • If so, then I would initialize it as follows:

    SD24B_init( __MSP430_BASEADDRESS_SD24_B__, SD24_B_CLOCKSOURCE_MCLK, SD24_B_PRECLOCKDIVIDER_1, SD24_B_CLOCKDIVIDER_1, SD24_B_REF_EXTERNAL );

    This is your one:

    SD24_B_init(0x0800,SD24_B_CLOCKSOURCE_MCLK | SD24_B_PRECLOCKDIVIDER_1 | SD24_B_CLOCKDIVIDER_1 | SD24_B_REF_INTERNAL));

    Do you see the difference? Not the 0x0800 - this is correct because it is defined in the header file for the processor

    #define __MSP430_BASEADDRESS_SD24_B__ 0x0800

    But you have to divide the single configuration entries by "," instead of ORing them. And there is a ")" too much at the end.

    Look at this document, page 112, chapter 35.3.

    Have fun!

    Dennis

  • Ohh sorry it is MSP430F6779.
  • As declaring as you have mentioned i am getting warning of
    1] conversion of non zero integer to pointer error 154#D
    2] Description Resource Path Location Type
    #169-D argument of type "int" is incompatible with parameter of type "SD24_B_initParam *"
  • Could you try this?

    SD24_B_init( __MSP430_BASEADDRESS_SD24_B__, SD24_B_CLOCKSOURCE_MCLK, SD24_B_PRECLOCKDIVIDER_1, SD24_B_CLOCKDIVIDER_1, SD24_B_REF_EXTERNAL );

    Dennis

  • it is showing error of too many arguments in function call.

    For most recent code sent by you

  • OK, then I don't know. There were two different types of defines - the one from the .pdf has everything without the additional "_" between SD24 and B:

    And the spelling from the online resource is with additional "_":

    But since I never used those functions, I don't know. Maybe has an idea or knows someone who has?

    Sorry!

    Dennis

  • yeah I have gone through this..
    Thanks for that
    But it is not working...
  • Hi Abhishek, Dennis,

    Can you report which version of driverlib you have installed (go to View > Resource Explorer, navigate to driverlib and you should be able to find the version number)? Base address handling got changed at one of the major revisions, and also now using initParam struct instead of passing everything as arguments. Make sure you have the latest version of MSPware, or you can try CCS cloud and cloud resource explorer, from http://dev.ti.com. Or you can update your local copy of MSPware from the CCS app center in CCS v6.

    Here's an example of using SD24_B with the latest driverlib: dev.ti.com/tirex By clicking the cloud icon you can import the project directly to CCS cloud, or you could download to your PC with the down-arrow download icon.

    The place I prefer to use for my driverlib documentation is the API programmer's guide: dev.ti.com/tirex's%20Guide. Then you can click Modules and select the module you are interested in - it will have interactive documentation of all of the functions and parameters here. You can find the same documentation for your particular driverlib version also in your CCS resource explorer on the desktop (the cloud resource explorer is showing documentation for the latest version online).

    Regards,
    Katie

  • HI Katie,Dennis,
    I am using the same library as you have mentioned in your link
    Thanks
    Regards
    Abhishek
  • But which version do you use? There are changes among major versions of the libraries, which is why the function calls were looking different.

    In CCS, go to View > Resource Explorer, then in Resource Explorer go to MSPWare > Libraries > Driver Library > MSP430 Driver Library Release Notes. Should look like this:

    And if you use the example I mentioned, does it build and work?

    Regards,

    Katie

  • Hello, Katie

    Please check this link 

    I am receiving this warnings

    drive.google.com/.../view

  • Ok
    I found the answer
    To write anything in structure .(dot) and function is used

**Attention** This is a public forum