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.

AM2634: AM2634 demo board cannot stop at breakpoints?

Part Number: AM2634

environment:

              CCS 12.7.0  

              AM263x-LP Evaluation Board(red) 

              demo rti_blink_am263x-lp_r5fss0-0_nortos_ti-arm-clang

I modified the clock configuration.(Unmentioned and unmodified)

              syscfg:   input clock freq: 200MHz

                            input clock source: SYS_CLK

                            enable counter block 0

                            desired output frequency: 1M

                            enable compare event0

                            Tick Period (usecs): 500,000

Modifications in the main function 

    System_init();
    Board_init();

    rti_led_blink(NULL);
    while(1);
//    Board_deinit();
//    System_deinit();

    return 0;

                            

Modifications in the rti_led_blink.c  

    /* Wait until the LED is blinked specified number of times */
    //while(gBlinkCount < LED_BLINK_COUNT);

    /* Stop the RTI counter */
    //RTI_counterDisable(CONFIG_RTI0_BASE_ADDR, RTI_TMR_CNT_BLK_INDEX_0);

    DebugP_log("[RTI LED Blink Test] Timer Stopped...\r\n");

    if(SystemP_SUCCESS == status)
    {
        DebugP_log("All tests have passed!!\r\n");
    }
    else
    {
        DebugP_log("Some tests have failed!!\r\n");
    }

//    Board_driversClose();
//    Drivers_close();
       

above to make sure led blink foever

I also added a breakpoint on "gBlinkCount++"

void rtiEvent0(void)
{
    if(gLedState == LED_ON)
    {
        GPIO_pinWriteLow(gpioBaseAddr, pinNum);
        gLedState = LED_OFF;
    }
    else{
        GPIO_pinWriteHigh(gpioBaseAddr, pinNum);
        gLedState = LED_ON;
    }
    gBlinkCount++;
}

expect result:

1.code will stop at line "gBlinkCount++"

2.when I disable breakpoint, led will blink every 0.5s and run forever

actual result:

1. code will always not stop at line "gBlinkCount++". When I manually pause the code, the variable gBlinkCount do increase, which is consistent with the number of LED flashes I observe.

    I'm not sure if it's CCS's bug or my wrong configuration

2. code will blink about 30s and then code goes to 0x000039DE (this just sometimes happens)

3. the register "RTI0_RTICOMP0" always count up during running my program (always happen)

  • Hello Zhou,

    1.code will stop at line "gBlinkCount++"

    What is likely happening here is if you are not using the gBlinkCount variable in other portions of your program, the compiler is optimizing it out as an unnecessary variable and so the debugger isn't able to break on it.

    2. code will blink about 30s and then code goes to 0x000039DE (this just sometimes happens)

    Is there anything repeatable about causing this happen or is it purely random? Does it happen only when pausing the debugger for example, or does the program just stop without you doing anything?

    Best Regards,

    Ralph Jacobi