mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-18 02:17:35 +08:00
Experimental fix to CAN bus lockup bug
This commit is contained in:
@@ -516,8 +516,12 @@ int CanIface::init(const uavcan::uint32_t bitrate, const OperatingMode mode)
|
||||
/*
|
||||
* Hardware initialization
|
||||
*/
|
||||
can_->MCR &= ~bxcan::MCR_SLEEP; // Exit sleep mode
|
||||
can_->MCR |= bxcan::MCR_INRQ; // Request init
|
||||
{
|
||||
CriticalSectionLocker lock;
|
||||
|
||||
can_->MCR &= ~bxcan::MCR_SLEEP; // Exit sleep mode
|
||||
can_->MCR |= bxcan::MCR_INRQ; // Request init
|
||||
}
|
||||
|
||||
if (!waitMsrINakBitStateChange(true))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user