RTC_basics ( ModusToolbox example)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
StefanoA_11
Employee
Employee
Welcome! First question asked First reply posted

This example was not working for me. I was not able to set the time.

I'm not sure this was due to some setting of my Teraterm.

Anyway, to make it work I had to do this change:

        rslt = cyhal_uart_getc(&cy_retarget_io_uart_obj, &ch, UART_TIMEOUT_MS);

        if(rslt != CY_RSLT_ERR_CSP_UART_GETC_TIMEOUT)

        { 

        if(ch == '\r')  /// changed, it was  if(ch == '\n')

            {

                break;

            }

//////////////////////////////

I also don't see printed on screen what I type while setting the time: for this, I had to add:

printf("%c",ch); fflush(stdout);

0 Likes
0 Replies