Transmit CAN frames with HAL Driver not working on a STM32F207
I wanted to send and receive a message via CAN2 of a STM32F207 Unit, but sending always reported errors.
But when I change the following lines in the HAL Driver it works and the receiver gets the CAN frames corretly.
Why is the TDTR of the mailbox not cleared or at least somehow configurable?
I needed to change these lines (in HAL_CAN_transmit and HAL_CAN_transmit_IT)
hcan->Instance->sTxMailBox[transmitmailbox].TDTR &= (uint32_t)0xFFFFFFF0U;
hcan->Instance->sTxMailBox[transmitmailbox].TDTR |= hcan->pTxMsg->DLC;to
hcan->Instance->sTxMailBox[transmitmailbox].TDTR = hcan->pTxMsg->DLC;I can't configure the timestamp feature anywhere via the driver but when the TDTR register is not zeroed (except the DLC value) transmit is not working.
I don't want to have changes in the HAL driver as updating the driver is then always a problem ... Any hints how this can be done?
Cheers
Thilo
