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.

MSP430F5438 Timer Vector Wrong

Other Parts Discussed in Thread: MSP430F5438, MSP430F5529

I'm trying to run TI_RTOS on an msp430f5438. I start from the '5529 code (which I have running fine on a 5529 launchpad). When I run the code, it goes into an infinite loop in the 54 interrupt vector. On a '5438, that is the would be the "TA0 TA0CCR0 CCIFG0" vector. On the 5529, the vector for the timer would be 53 and sure enough, there is handy code to handle vector 53. So when HwiFuncs.c is generated, the timer ISR is put on the wrong vector.

Very similar to the problem four years ago: 

e2e.ti.com/.../154623

I've tried to find where that vector is selected to no avail. I can use the hack with the linker to move the vector but is there a better solution?


PS. I'm using the ADC12 and it also changed vectors. But since I set the value for the vector, it was trivial to fix.

  • Hi Kevin,

    Have you seen this page for porting to TI-RTOS projects to other MSP430 devices:


    Did you make sure to change the Device Variant in the project properties to the MSP430F5438?

    Best regards,

        Janet

  • Yes I changed the variant to 5438. (I already had that.)
    I had not seen that porting page but following it is rather challenging since it seems pretty old.
    The first optional check won't work with the paths provided and some searching doesn't seem to help.
    However the check of linker.cmd file (in the debug directory) still references the 5529. That led me to the RTSC setting (near the tab for variant). It needed to be set as well. (not part of the process, must be new?)
    So I got that but the GPIO's still fail to work.
    I can't seem to single step into the source (indicating it didn't get rebuilt.)
    /db/vendors/ti/msp43xware/msp430_driverlib_2_21_00_08a/driverlib/MSP430F5xx_6xx/gpio.c (can't be my windows machine)
    And that is found in a 5529 library still in the linker properties for the project. But the build didn't create a version for the 5438 (at least not in the same place. ) Location:
    "${COM_TI_RTSC_TIRTOSMSP430_INSTALL_DIR}/products/msp430_driverlib_2_21_00_08a/driverlib/MSP430F5xx_6xx/ccs/MSP430F5529.lib"
    That would seem to have to go as well.

    How do I create the library for the 5438?
    Is there a newer version of the porting guide that reflects the current product?

  • Hi Kevin,
    You can look at the section "Creating a TI-RTOS Project for an MSP430 Device with EUSCI Drivers" on the page for porting TI-RTOS for other MSP430 devices. I don't think you have to worry about modifying your board file to use EUSCI drivers, but the first part of that section on re-building TI-RTOS and setting up the project, should be useful and refers to a much newer version of TI-RTOS.

    For the optional check, you should find the rebuilt driver libraries under something like:
    C:\ti\ccsv6.1.0.00104\tirtos_msp43x_2_14_03_28\products\MSPWare_2_00_00_40c\driverlib

    Best regards,
    Janet
  • Yes I did those steps and but no mention of how to handle the 5529 library or where to find it, etc.
    Your path suggestion seems to be obsolete . There is no MSPWare directory below the ccsv6 directory.
    It seems to live in c:\ti\msp430\MSPWare_3_20_00_37
    But like I said previously there is no ccs-MSP430F5438.lib file as suggested by the guide.

    By the way, this is a fresh install; I made the mistake of doing a "gmake clean" and after that it won't "gmake drivers" anymore. So my response was delayed while I installed it completely from scratch.

    Where do I go next?
  • Hi Kevin,
    Can you tell me what version of TI-RTOS you are using?
    Thanks,
    Janet
  • ti-rtos is 2.16.0.08
  • Hi Kevin,
    It looks like the build of the driverlib and TI-RTOS drivers has been separated in 2.16. There are now rules in tirtos.mak for cleaning and building the msp430 driverlib:
    gmake -f tirtos.mak clean-msp430-driverlib
    gmake -f tirtos.mak build-ccs-msp430-driverlib

    I'm trying this out on 2.16.00.08, but get a build error (syntax error), so it looks like there is a problem with one of the makefiles. Someone is looking into this now and we'll get back to you as soon as we find the problem.
    Best regards,
    Janet
  • Hi Kevin,
    It turns out some of the makefiles shipped with TI-RTOS for rebuilding the driverlib are not compatible with Windows (e.g. '/' in directory paths, 'rm'). I will file a bug for this. In the meantime, we'll work on a patch to give you.
    Best regards,
    Janet
  • Interesting!
    Any word on a patch to get me going?
  • Hi Kevin,

    Here is a Makefile you can put in the directory <ti-rtos_install_dir>/products/msp430_driverlib_2_21_00_08a/driverlib/MSP430F5xx_6xx.  It is a hack where I just replaced '/' with '\' in the mklib rule, so it is not a real fix but you can try it out.  I also changed 'rm -rf' to 'rmdir'

    You may need to do a similar thing to the MSP430FR5xx_6xx Makefile if you're building those libraries too (you can probably get around that by removing the MSP430FR devices from tirtos.mak).

    Let me know if this allows you to build.

    Best regards,

        Janet

    3108.Makefile.txt

  • I was able to get the library built. I also modified the second makefile so I could build the MSP430FR libraries.
    How will I know when the problem is fixed correctly?
  • Hi Kevin,

    This will be fixed in TI-RTOS 2.17 which is scheduled for release in mid-May.   You can check this page for updates:


    Best regards,

        Janet