Experimental fix to CAN bus lockup bug

This commit is contained in:
Pavel Kirienko
2015-10-09 05:10:13 +03:00
parent 69dc2114c9
commit 93fe54bb21
@@ -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))
{