Hello,
I am using RH850F1KM-S1. Firstly I tried the Uart transmit function ,which I generated from smart configurator tool.
Then I tried the receive function too but it was not receiving data. so I studied the datasheet and found "LURDR" is used for receive uart register.
but when I used this register , only a single data is being received and the whole data which I am sending is not received.
I tried many things to get the whole data , but it isn't working, So please can anyone help with this problem. or can attach any example code for this problem.
Thank you.
The number of bytes to be received from R_Config_UART0_Receive is specified in the 2nd argument. What value have you set there ?
Do the receive interrupts get triggered ?
Feel free to share your code.
Regards
Hi AZ-Renesas
I have used Sizeof function to specify the number of bytes used. No the receive interrupts is not triggered. if you have any example Uart code (working). please feel free to share the code.
Thank you
uint8_t rx_buffer[2]= "HI"; /* End user code. Do not edit comment generated here */ void r_main_userinit(void); /*********************************************************************************************************************** * Function Name: main * Description : This function implements main function. * Arguments : None * Return Value : None ***********************************************************************************************************************/ void main(void) { r_main_userinit(); /* Start user code for main. Do not edit comment generated here */ R_Systeminit(); R_Config_UART3_Create(); R_Config_UART3_Start(); /* End user code. Do not edit comment generated here */ while (1) { R_Config_UART3_Receive((uint8_t*)rx_buffer, sizeof(rx_buffer)); R_Config_UART3_Send((uint8_t*)rx_buffer, sizeof(rx_buffer)); } }
Have you checked with an oscillator/logic analyzer what data are sent from Tx pin ?
Yes, I have checked but only the single character is only transmitted 'n' number of time ,where n = size of the string
Have you checked with my project too ?
Yes I have checked with your project but in that I am not receiving anything. I tried using code generated functions but they are not working at all . so I am directly using the register ( LUTDR & LURDR) for receiving and transmitting data. but in that I am getting only single character from a string.
This the view on Tx pin on my board.
Thanks AZ-Renesas
but this is of no help to me, thanks for the reply.
Please share your project in a .zip file.
uart.rar
And this the issue I am facing
Using LUTDR is not necessary, you can use the generated APIs.
I cannot help with the settings of Docklight and how to transmit/receive a byte from there.
I share an e2studio project that transmits and receives "Hello" if you connect Tx with Rx pin.
UART_F1KM_S1.zip