cancel
Showing results for 
Search instead for 
Did you mean: 

Having two independent CAN channels in stm32f746discovery

Anjana R
Associate
Posted on June 22, 2017 at 13:51

Hello all,

I am working on two stm32f746discovery boards. I an trying to establish CAN communication between both the controllers. As far as i know stm32f746discovery has two CAN channels. I want both channels to be active at the same time and working independently. 

I am able to communicate via CAN1 without any problem. But when i try with CAN2, it gets stuck inside this loop in HAL_CAN_Init at this place,

/* Wait the acknowledge */

while((hcan->Instance->MSR & CAN_MSR_INAK) == CAN_MSR_INAK)

{

if((HAL_GetTick() - tickstart ) > CAN_TIMEOUT_VALUE)

{

hcan->State= HAL_CAN_STATE_TIMEOUT;

/* Process unlocked */

__HAL_UNLOCK(hcan);

return HAL_TIMEOUT;

}

}

I have a CAN driver that does all the hardware initialization and also calls the 

HAL_CAN_Init. Has anyone tried to work with CAN2 channel on stm32f746discovery. 

Please help.

#can #stm32f7-discovery
1 REPLY 1
Mark Bolan
Associate
Posted on November 07, 2017 at 12:05

Hi,

just wanna ask did you manage to resolve this issue. 

Im having same problem.