Hi
I am veritably new to CAN communication now I am working on transmitting and entering data between 2 RA2A1 MCUs but I do not know how to configure the CAN configuration on the alternate board. I have previously tested the circle- reverse mode on the first board, it’s working OK , but when I connect tx and rx of the first board to the alternate board, it wasn’t working. Here is my configuration.
and then are the lines that I used to flash into the first board and alternate board, thank you in advance.
To receive messages you have to set up the acceptance filters, so that it knows which communication figures to receive, and where to put the received messages.
To receive messages you have to set up the acceptance filters, so that it knows which communication figures to receive, and where to put the received messages.
See lessHave you added the CGC driver, and started the Main Oscillator before calling R_CAN_Open()? err = R_CGC_Open (&g_cgc0_ctrl, &g_cgc0_cfg); if (FSP_SUCCESS != err) { __BKPT(0); //TODO better error handling } err = R_CGC_ClockStart (&g_cgc0_ctrl, CGC_CLOCK_MAIN_OSC, NULL); if (FSP_SUCCESS !Read more
Have you added the CGC driver, and started the Main Oscillator before calling R_CAN_Open()?
err = R_CGC_Open (&g_cgc0_ctrl, &g_cgc0_cfg);
if (FSP_SUCCESS != err)
{
__BKPT(0); //TODO better error handling
}
err = R_CGC_ClockStart (&g_cgc0_ctrl, CGC_CLOCK_MAIN_OSC, NULL);
if (FSP_SUCCESS != err)
{
__BKPT(0); //TODO better error handling
}
do
{
err = R_CGC_ClockCheck(&g_cgc0_ctrl, CGC_CLOCK_MAIN_OSC);
}while(FSP_ERR_NOT_STABILIZED == err);
if (FSP_SUCCESS != err)
{
__BKPT(0); //TODO better error handling
}
/* Initialize CAN module */
See lesserr = R_CAN_Open(&g_can0_ctrl, &g_can0_cfg);
/* Error trap */
if(FSP_SUCCESS != err)
{
__BKPT(0); //TODO better error handling
}