RH850F1KM-S1 KIT UART RECEIVE ISSUE

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.

Parents
  • Hello,

    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

    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));
           }
    
    }
    

Reply
  • Hi

    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));
           }
    
    }
    

Children