RTC on running mode vs debugging using IAR

Hello, 

I'm trying to print time stamp through UART, using RTC1 of the ADUCM3029, when using the debugger (CMSIS_DAP  of the EVAL_ADUCP3029)

I succeed to do it in debugging mode however when running the code without the debugger the execution is interrupted.

void initRtc()
{
    printf("calling BuildSeconds\n");
    uint32_t buildTime = BuildSeconds();
    printf("calling adi_rtc_Open\n");
    adi_rtc_Open(RTC_ALARM_DEV_NUM, rtcAlarmMem, ADI_RTC_MEMORY_SIZE, &hDevRtcAlarm);
    printf("calling adi_rtc_Enable\n");
    adi_rtc_Enable(hDevRtcAlarm, true);
    printf("calling adi_rtc_SetTrim\n");
    adi_rtc_SetTrim(hDevRtcAlarm,ADI_RTC_TRIM_INTERVAL_14,ADI_RTC_TRIM_1,ADI_RTC_TRIM_SUB);
    printf("calling adi_rtc_EnableTrim\n");
    adi_rtc_EnableTrim(hDevRtcAlarm, true);
}

void main()

{

     initRtc();
     get_time_date(timesss);
     printf("%s\n",timesss);
     uint32_t raw=(uint32_t)get_raw_time_date();
     get_time_date(timesss);
     printf("%u\n",raw);

    printf("complete\n");

}

on dbugging mode I get:

calling BuildSeconds
calling adi_rtc_Open
calling adi_rtc_Enable
calling adi_rtc_SetTrim
calling adi_rtc_EnableTrim
UTC time: Fri Sep 20 18:35:36 2019

1569004536
complete

on running mode the code dosn't reach to print complete:

calling BuildSeconds
calling adi_rtc_Open
calling adi_rtc_Enable
calling adi_rtc_SetTrim
calling adi_rtc_EnableTrim

Can you help me figure out this problem?



tagged
[edited by: JValeriani at 8:16 PM (GMT 0) on 3 Oct 2019]
Parents Reply Children
No Data