2016-03-14 03:26 AM
Hi,
I wrote about in other topic but it was not clear so I took decision to start other topic. I'm working with CAN of F103 with CubeMX configuration. Transmiting works fine but I have problem with receive. Before while loop in user code I copied part from CubeF1 example package:/*##-2- Start the Reception process and enable reception interrupt #########*/
if (HAL_CAN_Receive_IT(&hcan, CAN_FIFO0) != HAL_OK)
{
/* Reception Error */
Error_Handler();
}
It shall enable interrupt but I'm not getting any callback...
I have to call it manualy like this:
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
HAL_CAN_Transmit(&hcan, 10);
if(HAL_CAN_Receive(&hcan, CAN_FIFO0,10) == HAL_OK)
{
HAL_CAN_RxCpltCallback(&hcan);
}
HAL_Delay(10);
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
In that way it's working on loopback mode.
Any idea why do I have to do it that way?
2016-03-26 09:59 AM
No one have similar problem ?
There are not that many people here.