2014-09-08 02:47 PM
I am working on the STM32F302 Micro and I currently unable to receive data on the CAN bus, I have a break point set on the interrupt routine. I am able to transmit data. I am seeing the micro sends an acknowledge bit when I send data from my CAN tool, so I know the message is getting there, but when I look at the receive buffer I see nothing. I figure since my CAN tool receives the data from the micro without error I have all the timing set appropriately.
I am set for interrupt on Tx and Rx:
/* Transmit */
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0);
HAL_NVIC_SetPriority(USB_HP_CAN_TX_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(USB_HP_CAN_TX_IRQn);
/* Receive */
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0);
HAL_NVIC_SetPriority(USB_LP_CAN_RX0_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(USB_LP_CAN_RX0_IRQn);
Interrupt routine:
void USB_LP_CAN_RX0_IRQHandler(void)
{
HAL_NVIC_ClearPendingIRQ(USB_LP_CAN_RX0_IRQn);
HAL_CAN_IRQHandler(&hcan);
}
I have F0R1 and F0R2 set to 0x04, I am using an extended ID.
I have CAN transmitting and receiving on a STM32F103 and I have compared my setup and see no difference. So I am running out of guesses.
#can #bxcan #filter #stm32 #stm32f2 #code #example #stm32-can2015-01-26 06:42 AM
Dear ebommer
Have you found out the solution for this..Even I am also facing the same problem