RL78F13 UART connection

Hi Team,

I have UART connection problem in R-Car-V4H MCU RL78/F13.

I can't receive the correct data when the MCU sends buffer data('a') via UART.

If your have a sample code, please provide it to me, thank you!

  

uint8_t tx_buf[] = {'a'};

void clock_sleep(long d)
{
	while(d--);
}

void main(void)
{	
    R_MAIN_UserInit();
    
    R_UART0_Start();
    
    while (1)
    {
		R_UART0_Send(tx_buf, 1);
	    clock_sleep(1000000);
    }
}

void R_MAIN_UserInit(void)
{
    EI();
}

Thanks!

Louis,

Parents
  • Hi Louis, 

    I had the same problem with another controller (RL78/G23). What helped me was to change the source clock of the peripheral to a different one. If this doesn't help, it would be interesting to see what signal the controller is sending. I recommend using an oscilloscope or logic analyser. If you observe the signal, I think Putty's interpretation is a framing error 0xFF, which results in an ASCII symbol ÿ.
    For an "a" that you are trying to send, the binary interpretation is 0110 0001 and would look like this in a time domain:

    If the pattern generated looks correct on the output pin, the problem of misinterpretation is very likely.
    It would be very helpful if you could provide a representation of your output signal.

    I hope this helps 

    PC_Renesas

Reply
  • Hi Louis, 

    I had the same problem with another controller (RL78/G23). What helped me was to change the source clock of the peripheral to a different one. If this doesn't help, it would be interesting to see what signal the controller is sending. I recommend using an oscilloscope or logic analyser. If you observe the signal, I think Putty's interpretation is a framing error 0xFF, which results in an ASCII symbol ÿ.
    For an "a" that you are trying to send, the binary interpretation is 0110 0001 and would look like this in a time domain:

    If the pattern generated looks correct on the output pin, the problem of misinterpretation is very likely.
    It would be very helpful if you could provide a representation of your output signal.

    I hope this helps 

    PC_Renesas

Children