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)
