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/MSP430FR59941: UART Interrupt not triggered on MSP430FR5994(1) when Code is flashed with CCS10

Part Number: MSP430FR59941
Other Parts Discussed in Thread: MSP-EXP430FR5994, MSP430FR5994, MSP430WARE, , MSP430FR2111, MSP430FR5964

Tool/software: Code Composer Studio

The example eusci_a_uart_ex1_loopbackAdvanced.c from the driverlib works fine on a Launchpad MSP-EXP430FR5994 when flashed with CCS9.3.0.00012 and eighther TI v18.12.6LTS and v20.2.2.LTS compiler.

For CCS10.1.0.00010 it does not work with any compiler. It seems like the UART interrupt is not triggered at all.

What toolchain-changes could cause this behaviour in CCS10?

Can anyone reproduce this on his machine? I use Windows 10 64Bit 20.04.

  • Hello,

    It is unusual that the CCS version would be the difference if you are using the same version of the compiler.

    Can you provide the *.out file from both 9.3.0 and 10.1.0. Make sure you build both with the same compiler version.

    Thanks

    ki

  • Hi ki,

    thanks for the quick response.

    The file upload failed for me whyever, therefore I provide a link to our fileshare:
    cloud.work-microwave.com/.../EPWn5XMEZrfWnq6

    Password: TI-Forum2020

    Both files were built with the v20.2.2.LTS compiler.

  • Thanks. I did a diff of the files and one of the sections is different. I'm not sure if that is the cause of the error. If you flash the 9.3.0 out file in CCS 10, does it work as expected?

  • Yes, flashing the CCS930.out file from CCS10 works as expected.

    It must be something in the toolchain. I didn't change the default settings.

    Here are my Compiler flags:

    CCS930:

    -vmspx --data_model=restricted --use_hw_mpy=F5 --include_path="C:/ti/ccs930/ccs/ccs_base/msp430/include" --include_path="C:/Users/lli/src/CCWorkspace/eusci_a_uart_ex1_loopbackAdvanced" --include_path="C:/Users/lli/src/CCWorkspace/eusci_a_uart_ex1_loopbackAdvanced/driverlib/MSP430FR5xx_6xx" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-msp430_20.2.2.LTS/include" --advice:power="none" --advice:hw_config=all --define=DEPRECATED --define=__MSP430FR5994__ --define=_MPU_ENABLE -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40

    CCS10:

    -vmspx --data_model=restricted --use_hw_mpy=F5 --include_path="C:/ti/ccs1010/ccs/ccs_base/msp430/include" --include_path="C:/Users/lli/src/CCWorkspace10/eusci_a_uart_ex1_loopbackAdvanced" --include_path="C:/Users/lli/src/CCWorkspace10/eusci_a_uart_ex1_loopbackAdvanced/driverlib/MSP430FR5xx_6xx" --include_path="C:/ti/ccs1010/ccs/tools/compiler/ti-cgt-msp430_20.2.2.LTS/include" --advice:power="none" --advice:hw_config=all --define=DEPRECATED --define=__MSP430FR5994__ --define=_MPU_ENABLE -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40

  • Ki said:
    I did a diff of the files and one of the sections is different.

    Having a look at the differences:

    • The differences are in byte offsets 4..17 of the .const section
    • Where the eusci_a_uart_ex1_loopbackAdvanced_CCS10.out has byte values of 0xff and the eusci_a_uart_ex1_loopbackAdvanced_CCS930.out has other values.
    • The differences are in the GPIO_PORT_TO_BASE[] array in the driverlib gpio.c, for indices 2..8.
    • The GPIO_PORT_TO_BASE[] is initialised using conditional compilation based upon the type of device, where an entry is the base address of a GPIO port which exists on the device, or 0xffff if the GPIO port doesn't exist.
    • In the CCS10 built version the GPIO_PORT_TO_BASE[] entries for PORT2 .. PORT8 are set to 0xffff meaning the driverlib GPIO functions consider the ports don't exist on the device, whereas the same entries in the CCS 9.3 built version have the base port addresses.

    Ki said:
    . I'm not sure if that is the cause of the error.

    The main function in eusci_a_uart_ex1_loopbackAdvanced.c calls:

        // Configure UART pins
        //Set P2.0 and P2.1 as Secondary Module Function Input.
        /*
    
        * Select Port 2d
        * Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI).
        */
        GPIO_setAsPeripheralModuleFunctionInputPin(
        GPIO_PORT_P2,
        GPIO_PIN0 + GPIO_PIN1,
        GPIO_SECONDARY_MODULE_FUNCTION
        );
    

    Since the GPIO_PORT_TO_BASE[] entry for GPIO_PORT_P2 is 0xffff in the CCS 10 built version the above driver lib call will fail to set port 2 secondary module function, leading to the program not working.

  • Thank for the great analysis Chester. I will bring this thread to the attention of the device experts.

  • I can follow up on your point and indeed the definitions in msp430fr5994.h for CCS930 and CCS1010 differ at this point:

    CCS1010:

    /*****************************************************************************
     DIO Registers
    *****************************************************************************/
    
    #define __MSP430_HAS_DIO__                    /* Definition to show that module is available */
    #define __MSP430_BASEADDRESS_DIO__ 0x0200
    #define DIO_BASE               __MSP430_BASEADDRESS_DIO__
    #define __MSP430_HAS_PORTA_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORTA_R__ 0x200
    #define PA_BASE                __MSP430_BASEADDRESS_PORTA_R__
    #define __MSP430_HAS_PORTJ_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORTJ_R__ 0x320
    #define PJ_BASE                __MSP430_BASEADDRESS_PORTJ_R__
    #define __MSP430_HAS_PORT1_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORT1_R__ 0x200
    #define P1_BASE                __MSP430_BASEADDRESS_PORT1_R__
    #define __MSP430_HAS_PASEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_PASEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_PJSEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_PJSEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_P1SEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_P1SEL1__                 /* Define for DriverLib */

    CCS930:

    /*****************************************************************************
     DIO Registers
    *****************************************************************************/
    
    #define __MSP430_HAS_DIO__                    /* Definition to show that module is available */
    #define __MSP430_BASEADDRESS_DIO__ 0x0200
    #define DIO_BASE               __MSP430_BASEADDRESS_DIO__
    #define __MSP430_HAS_PORTA_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORTA_R__ 0x200
    #define PA_BASE                __MSP430_BASEADDRESS_PORTA_R__
    #define __MSP430_HAS_PORTB_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORTB_R__ 0x220
    #define PB_BASE                __MSP430_BASEADDRESS_PORTB_R__
    #define __MSP430_HAS_PORTC_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORTC_R__ 0x240
    #define PC_BASE                __MSP430_BASEADDRESS_PORTC_R__
    #define __MSP430_HAS_PORTD_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORTD_R__ 0x260
    #define PD_BASE                __MSP430_BASEADDRESS_PORTD_R__
    #define __MSP430_HAS_PORTJ_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORTJ_R__ 0x320
    #define PJ_BASE                __MSP430_BASEADDRESS_PORTJ_R__
    #define __MSP430_HAS_PORT1_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORT1_R__ 0x200
    #define P1_BASE                __MSP430_BASEADDRESS_PORT1_R__
    #define __MSP430_HAS_PORT2_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORT2_R__ 0x200
    #define P2_BASE                __MSP430_BASEADDRESS_PORT2_R__
    #define __MSP430_HAS_PORT3_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORT3_R__ 0x220
    #define P3_BASE                __MSP430_BASEADDRESS_PORT3_R__
    #define __MSP430_HAS_PORT4_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORT4_R__ 0x220
    #define P4_BASE                __MSP430_BASEADDRESS_PORT4_R__
    #define __MSP430_HAS_PORT5_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORT5_R__ 0x240
    #define P5_BASE                __MSP430_BASEADDRESS_PORT5_R__
    #define __MSP430_HAS_PORT6_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORT6_R__ 0x240
    #define P6_BASE                __MSP430_BASEADDRESS_PORT6_R__
    #define __MSP430_HAS_PORT7_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORT7_R__ 0x260
    #define P7_BASE                __MSP430_BASEADDRESS_PORT7_R__
    #define __MSP430_HAS_PORT8_R__                /* Definition to show that port is available */
    #define __MSP430_BASEADDRESS_PORT8_R__ 0x260
    #define P8_BASE                __MSP430_BASEADDRESS_PORT8_R__
    #define __MSP430_HAS_PASEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_PASEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_PBSEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_PBSEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_PCSEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_PCSEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_PDSEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_PDSEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_PJSEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_PJSEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_P1SEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_P2SEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_P1SEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_P2SEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_P4SEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_P3SEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_P3SEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_P4SEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_P5SEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_P6SEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_P5SEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_P6SEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_P7SEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_P8SEL0__                 /* Define for DriverLib */
    #define __MSP430_HAS_P7SEL1__                 /* Define for DriverLib */
    #define __MSP430_HAS_P8SEL1__                 /* Define for DriverLib */

    Can I safely copy the content of the msp430fr5994.h from CCS930 over to CCS1010?

    Would that be a valid fix in your eyes or is there a more elegant solution?

  • Chester Gillon said:
    Since the GPIO_PORT_TO_BASE[] entry for GPIO_PORT_P2 is 0xffff in the CCS 10 built version the above driver lib call will fail to set port 2 secondary module function, leading to the program not working.

    I have managed to repeat the issue. Using 10.1.0.00010  I imported the MSP430Ware (3.80.09.03) ->Libraries -> Driver Library -> MSP430FR5xx_6xx / Example Projects -> EUSCI_A_UART -> eusci_a_uart_ex1_loopbackAdvanced example.

    After import the device type was set to a MSP430FR5994 (I don't have a MSP430FR59941), and built using compiler v20.2.2. On debugging on a MSP-EXP430FR5994 the GPIO_PORT_TO_BASE[] entries for ports 2 .. 8 are all 65535 (0xffff):

    The project was copied into a CCS 9.3.0.00012 workspace and re-built with the same v20.2.2 compiler version. On debugging the  GPIO_PORT_TO_BASE[] entries for ports 2 .. 8 are now their base port addresses:

    Will investigate the cause of the difference in the GPIO_PORT_TO_BASE[] driverlib gpio.c array when the same project is built under CCS 9.3 and CCS 10.

  • Simply copying the DIO Register Settings Part from msp430fr5994.h in CCS930 over to CCS1010 resolves the problem.

    The same goes for the msp430fr59941.h in CCS1010.

    Should be a simple update to the MSP430Ware in CCS1010.

    I am able to use CCS1010 from now on thanks for hinting me to the culprit =)

  • Lukas Lischke said:
    I can follow up on your point and indeed the definitions in msp430fr5994.h for CCS930 and CCS1010 differ at this point

    I see the same difference:

    For the above:

    • CCS 9.3.0.00012 had MSP430 general support files 9.2.0 com.ti.msp430.support_files.feature.group : Build 1.208 (CCS) installed
    • CCS 10.1.0.00010  had MSP430 general support files 10.1.1 com.ti.msp430.support_files.feature.group : Build 1.210 (CCS) installed

    Looking at ccs\ccs_base\msp430\ReleaseNotes_MSP430_HeaderFiles.txt suspect there was an error made in msp430fr5994.h when was modified for the following change in Build 1.210 (CCS):

    Bug fixes:
    ----------
    - Removed invalid IO ports from several MSP430FRxx devices

    Lukas Lischke said:
    Can I safely copy the content of the msp430fr5994.h from CCS930 over to CCS1010?

    As a quick-fix I think that would work and then performing a re-build of the project. Probably worth backing up the original file first.

    Lukas Lischke said:
    Would that be a valid fix in your eyes or is there a more elegant solution?

    Perhaps in CCS could revert to a previous version of com.ti.msp430.support_files.feature.group component. Ki should hopefully know if that is possible.

  • There's apparently a similar thing with the FR2111[.h]. 

    https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/941644/3478301

    I wonder if there's a release-script thing or something.

    I'm still on v8, so I can't really comment.

  • Bruce McKenney47378 said:
    There's apparently a similar thing with the FR2111[.h]. 

    Comparing the msp430fr2111.h between MSP430_HeaderFiles Build 1.208 (in CCS 9.3.0) and Build 1.210 and (CCS 10.1.0) does show that the definition for port 2 has also been incorrectly removed:

    Note that port J is shown as present in the MSP430FR2111 in both versions, yet the datasheet doesn't show a port J on a MSP430FR2111.

    Bruce McKenney47378 said:
    I wonder if there's a release-script thing or something.

    Not sure to how easily check all device files for the correct definitions of which ports are present. 

  • I don't have V10, but I just thought it was a curious coincidence that that person also encountered a missing "_HAS_" symbol going from V9->V10.

    I should have been more explicit: I assume there's an automatic script that generates those .h files from <something>, and maybe it slipped up on more than these one or two.

  • Bruce McKenney47378 said:
    I should have been more explicit: I assume there's an automatic script that generates those .h files from <something>, and maybe it slipped up on more than these one or two.

    Agree that sounds likely.

    I see someone has reported an issue with a MSP430FR5964 - see CCS/MSP430FR5964: Device I/O definitions missing from header

    And the problem with missing definitions was first recognised in CCS/MSP430FR5994: msp430fr5994.h version 1210 (CCS 10.1.0) is missing Digital I/O Base Address Definition

  • Hi Lukas,

    This issue has been brought to our attention and our SW team has been notified.

  • Hi Lukas,

    It's been a few days since I have heard from you so I’m assuming you were able to work around this temporary problem.  Our software team is addressing this and will have an update to the MSP430 compiler in Q4.

    For now I will mark this thread closed.
    Please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.



  • Hi Dennis,

    your assumtion is correct. I worked around the temportary issue via copying the missing defines from the older driverlib file version.

    Good to read that the problem will be resolved in Q4.

    Best regards

    Lukas