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.

CC2642R: Issue Integrating MAX72xx Library with CC2642R1F Microcontroller

Part Number: CC2642R
Other Parts Discussed in Thread: SYSCONFIG, CODECOMPOSER

Tool/software:

Dear TI Support Team, 

am getting errors while integrating the MAX72xx library (written in C++) into my project. I am working on a project using MAX7219 ICs for LED control with the CC2642R1F microcontroller.

Please find the details of the versions we are using:

  • SDK Version: simplelink_cc13x2_26x2_sdk_5_20_00_52
  • System Configurator Version: sysconfig_1.8.2
  • Code Composer Studio Version: 11.1.0.00011

Please let me know is there any other versions i need to install to compile c++ code in Codecomposer

We would appreciate your support in resolving this issue as soon as possible.
Please let me know if you need any further details.

Regards,
Triveni H M

  • Hi Triveni,

    This compilation failure appears to be unrelated to your MAX72xx Library unless you are using a specific compiler to make it work.  The compiler recommended by the CC13X2 / CC26X2 you are using is ARM-CGT 20.2.4.LTS.  You can check out the Compiler User's Guide pragma directives against the version you are using.  The error involves incorrect interpretation of the following ccfg.c lines (referenced by the ti_devices_config.c generated by SysConfig):

    #pragma DATA_SECTION(__ccfg, ".ccfg")
    #pragma RETAIN(__ccfg)

    Regards,
    Ryan

  • Hi Ryan,

    We’re working on a project based on the CC2642R1F, and our base code is written in C. We're currently attempting to integrate C++ source files into the existing project.

    To validate C++ support, we ran a basic C++ test (e.g., toggling a GPIO), and it worked without issues. However, when we try to add our actual C++ application code, the program starts running but then unexpectedly hits a breakpoint, even though we haven't explicitly set one at that location.

    • SDK Version: simplelink_cc13x2_26x2_sdk_5_20_00_52
    • System Configurator Version: sysconfig_1.8.2
    • Code Composer Studio Version: 11.1.0.00011

    We’d really appreciate any guidance or examples you can share

    Best Regards,

    Triveni H M

  • First I must warn that the Compiler (Clang v1.3) your project is using has limited support for the SimpleLink CC13X2/CC26X2 SDK v5.20, but this is likely not a concern if no issues arise with your baseline project (i.e. c++ based code worked before adding the MAX72xx library).

    Breakpoints do not occur without Debugger involvement, instead you are likely entering a hardware assert while forever loop.  Please provide more debug details by stepping through code and discovering what part of the library is causing issues.  Do you have the source code for the displayBitmap function and from where does the MAX72xx library originate?

    Regards,
    Ryan

  • Hi Ryan,

    We installed the latest SDK version-- simplelink_cc13xx_cc26xx_sdk_8_30_01_01

    I’m working on integrating the MD_MAX72xx LED matrix driver library with the CC2642R1F. The integration is successful, and the code compiles without any issues. However, when I run the application and verify the code flow, I’m encountering a problem during execution.

    Specifically, inside the setC method, the code flows correctly until the line:

     

    The code executes normally until it reaches this line in MD_MAX72xx_buf.cpp

    if (value & (1 << i))

    This line gets hit, but immediately after, the execution jumps to the error.c file at the following snippet:

     

    if (Error_policy_D == Error_SPIN) {

        for(;;) {

        }

    }

    It seems like some assertion or internal error handling is being triggered, but there is no clear error or assert message explaining the cause.

    For reference, the MD_MAX72xx library I'm using is from the following GitHub repository:
     Point right https://github.com/MajicDesigns/MD_MAX72XX/tree/main/src 

    Regards,

    TRIVENI H M

  • Hi Triveni,

    I assume the bitSet, HW_ROW, or HW_COL functions are causing a hardware assert.  You're likely having difficulty in isolating the root cause due to Compiler optimization.  Is this the first location in the code that these operations is called after device startup?  You can break lines 211/212 into multiple operations to further determine where the failure occurs.  Have you considered asking the Github project contributors for advice?

    Regards,
    Ryan