i'm working with little project on STM32F105, but libraries have never been corrected from STM and bugs are presents also on last version
* @version V1.0.4
* @date 29-April-2016
Now i have a little doubts about STM library, on HAL_CAN_Receive_IT function.
First question is:
Its correct enable the Transmit mailbox empty Interrupt (CAN_IT_TME ) on receive ?
Its correct to UNLOCK the can before enable the message pending Interrupt (CAN_IT_FMP0 or CAN_IT_FMP1) ? Or is better enable all needed interrupt and unlock after ?
Sorry for my english
/* Enable interrupts: */
/* - Enable Error warning Interrupt */
/* - Enable Error passive Interrupt */
/* - Enable Bus-off Interrupt */
/* - Enable Last error code Interrupt */
/* - Enable Error Interrupt */
/* - Enable Transmit mailbox empty Interrupt */
/* __HAL_CAN_ENABLE_IT(hcan, CAN_IT_EWG |
__HAL_UNLOCK(hcan); // its correct this line here ?
if(FIFONumber == CAN_FIFO0)
// Enable FIFO 0 message pending Interrupt //
// Enable FIFO 1 message pending Interrupt //