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)); } }
The shared UART project on this post may seem useful:
community.renesas.com/.../113502
I tried the program that you mentioned above but it isn't working. I am still receiving only single data. I tried everything I could but I am not receiving anything other than the the first character of the data. please help.
I am not sure what you are trying to do with your code. You receive and transmit the same buffer.
Please find the attached project which works if you connect the correct UART pins with each other.
PS. The project is for F1KM-S4
PS2. Make sure you have the latest CS+ version.
.UART_F1KM_S4.zip
As I said before I tried with the file above , but I am having the same issue (only one data is received). It is not solved . so please help.
I am trying to receive the transmitted data through usb to ttl module and transmit the data which I receive. this is the objective of the project
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.