First, I want to thanks Edoardo for the hdcanv1/v2 refactor, and filtering integration.
I will in the future submit some patches driven by real usager in flying machine.
For now just a simple bug, fdcanv2 will wrongly assert when using filtering on CAND1 :
Code: Select all
void can_lld_set_filters(CANDriver *canp, uint8_t num, const CANFilter *cfp) {
uint8_t i;
uint8_t num_std_filter = 0;
uint8_t num_ext_filter = 0;
uint32_t can_offset_instance = 0;
#if STM32_CAN_USE_FDCAN1
if (&CAND1 == canp) {
can_offset_instance = CAN1_OFFSET_INSTANCE;
}
#endif
#if STM32_CAN_USE_FDCAN2
if (&CAND2 == canp) {
can_offset_instance = CAN2_OFFSET_INSTANCE;
}
#endif
#if STM32_CAN_USE_FDCAN3
if (&CAND3 == canp) {
can_offset_instance = CAN3_OFFSET_INSTANCE;
}
#endif
osalDbgAssert(can_offset_instance != 0, "CAN offset instance failed");
when using CAND1, CAN1_OFFSET_INSTANCE is 0, so the assert will always fire.
Alexandre