Skip to content

Commit

Permalink
Merge pull request #115 from UAVCAN/stm32-acceptance-filter-fix
Browse files Browse the repository at this point in the history
Fixed the CAN acceptance filter initialization in the STM32 driver
  • Loading branch information
pavel-kirienko authored Nov 24, 2017
2 parents fa6dbde + 414a2e2 commit a1022b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libuavcan_drivers/stm32/driver/src/uc_stm32_can.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ uavcan::int16_t CanIface::configureFilters(const uavcan::CanFilterConfig* filter
{
can_->FilterRegister[filter_start_index].FR1 = 0;
can_->FilterRegister[filter_start_index].FR2 = 0;
can_->FA1R = 1 << filter_start_index;
// We can't directly overwrite FA1R because that breaks the other CAN interface
can_->FA1R |= 1U << filter_start_index; // Other filters may still be enabled, we don't care
}
else
{
Expand Down

0 comments on commit a1022b0

Please sign in to comment.