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: Example code for connecting BQ76PL536EVM-3 and MSP430F5529

Part Number: MSP430F5529
Other Parts Discussed in Thread: BQ76PL536EVM-3, ENERGIA

Tool/software: Code Composer Studio

Hello,

I am trying to connect the bq76pl536evm-3 and msp430f5529 to develop a battery management system.  I believe I have figured out the SPI connections between the devices, and currently trying to implement code into the msp430 to run the two devices together.

I'm slightly unsure where to get started with this code to initialize the bq76pl536evm-3.  In some forum posts about the msp430f5529 and bq76pl536evm-3, people discuss example code described in SLAA478.  I am unsure what this code is and where to find it.

Also, is it possible to use Energia with these devices? Or would CCS be better?

Any coding tips or advice for these two devices would help!

  • Nathan White said:
    people discuss example code described in SLAA478.  I am unsure what this code is and where to find it.

    Read SLAA478. It provides the link to the discussed code example.

    Nathan White said:
    Also, is it possible to use Energia with these devices?

    In software, almost everything is possible.
    I guess you wold need to write drivers/libraries for your bq part, USB drivers, probably much more.

    Nathan White said:
    Or would CCS be better?

    From my perspective, CCS based development is better idea.

    Nathan White said:
    Any coding tips or advice for these two devices would help!

    There are no silver bullets.
    Experts can provide you with hundreds of tips regarding MSP430. 

    Refer to official product pages, especially links related to s/w. 
    Check this page: http://www.ti.com/tool/bq76pl536evm-3-sw 

  • Hi Tomasz, Do you know what section in SLAA478 I can find the example code? I have read it multiple times and am still unsure where to find it. Thanks
  • 1st page, 4th paragraph provides the download link.
  • Found the code from the link in the application report, didn't realize it was at the top.

    I am trying to implement the code from the "CCS" folder, from the "Source Code," and am unsure which file to load into my msp430f5529.  Would you be able to explain how I can implement the files under "Source Code" into CCS so get functioning operation between these devices?

    I am very new to these devices so please bear with me.

    Thanks,
    Nathan

  • Nathan,
    you need to start with something simple.
    Please, follow this link: dev.ti.com/.../node
    Plenty of examples for your favorite MCU.

    Right now I cannot compile SLA478 code.
    SLA478 is based on very old compiler version v3.3.1
    Using v4.2.1 which I have fails at UPCS0 symbol.

    I will back on Tuesday.
  • Tom,
    I will look through the link you have provided.
    Please get back to me with any advice or suggestions you have about this.
    Would the program work if I used v3.3.1 of CCS?

    Regards,
    Nathan
  • Compiler v3.3.1, not CCS.
  • Tom,
    I'm not sure I understand the difference between Compiler v3.3.1 and CCS.
    The files that have the example code, from SLAA478, are labeled "CCS." Is CCS not usable with these files?
    There are also IAR files from SLAA478. Is using IAR another option? Are you familiar with this IDE?

    Still not having much progress connecting the BMS with the msp430. Any other suggestions would greatly help.

    Regards,
    Nathan
  • Nathan,

    Nathan White said:
    I'm not sure I understand the difference between Compiler v3.3.1 and CCS.


    You cannot drive a car if you do not know a difference between a gas and a break pedals.

    Start reading from here: http://dev.ti.com/tirex3/#/?link=Development%20Tools%2FIntegrated%20Development%20Environments%2FCode%20Composer%20Studio

    Nathan White said:
    Is CCS not usable with these files?


    It is suitable.

    Nathan White said:
    Is using IAR another option? Are you familiar with this IDE?


    Yes, it is an alternative option. No, I am not.

    Today later I will ask for an access to an old compiler. 

  • I should have been more clear. When you say Compiler v3.3.1, do you mean CCS Compiler v3.3.1?
    Or are you describing a compiler made by a different company? If so, who produces it?

    I will look over the link you have posted. Thank you for your ongoing support.


    Regards,
    Nathan

  • Nathan White said:
    When you say Compiler v3.3.1, do you mean CCS Compiler v3.3.1?

    TI compiler v3.3.1.

    I have installed TI vompiler v3.3.1.
    Does not help.
    "../SourceCode/USB_Common/usb.c", line 336: error: identifier "UPCS0" is undefined

    I will check USB settings tomorrow.

  • Tom,

    I have added the CCS files from SLAA478 into a CCS workspace. At first I was receiving a few errors when trying to compile main.c, but have resolved them. Only error I am having now is the same one you having with “UPSC0” being undefined.
    Removing “UPSC0” from the code only produces warnings, and no errors, in CCS. Would it be ok to remove this variable? Line 336 is the only place in the code where “UPSC0” is located.

    Regards,
    Nathan
  • Nathan, 

    Nathan White said:
    Removing “UPSC0” from the code only produces warnings, and no errors, in CCS. Would it be ok to remove this variable? Line 336 is the only place in the code where “UPSC0” is located.


    I expected that UPSC0 could be a typo error. 
    Based on MSP430F5529 datasheet I see that UPSC0 is related to features not offered by USBPLLCTL Control Register. 
    In my modest opinion, commenting out UPSC0 and keeping in mind that "Select XT2 as Ref" option is unavailable, is the way to go.