2017-07-05 03:11 AM
Hi,
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 ?
Secondt question:
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 | CAN_IT_EPV | CAN_IT_BOF | CAN_IT_LEC | CAN_IT_ERR |CAN_IT_TME );__HAL_UNLOCK(hcan); // its correct this line here ?
if(FIFONumber == CAN_FIFO0)
{ // Enable FIFO 0 message pending Interrupt // __HAL_CAN_ENABLE_IT(hcan, CAN_IT_FMP0); } else { // Enable FIFO 1 message pending Interrupt // __HAL_CAN_ENABLE_IT(hcan, CAN_IT_FMP1); }*/#stm32f1xx-can1-can2-hal_can_receive_it-bug-unlock2017-07-05 03:48 AM
Hello
Origa.Marco
,I raisedinternally your reported issue andI will keep you informed about the taken actions or explanation.
Regards
Imen