Настораживает вот эта выдержка из даташита по CANCDMOB.
• Bit 7:6 – CONMOB1:0: Configuration of Message Object
These bits set the communication to be performed (no initial value after RESET).
•00 - disable.
•01 - enable transmission.
•10 - enable reception.
•11 - enable frame buffer reception
These bits are not cleared once the communication is performed. The user must rewrite
the configuration to enable a new communication.
•This operation is necessary to be able to reset the BXOK flag.
•This operation also set the corresponding bit in the CANEN registers.
А также вот такие выдержки из библиотек
Код
#define CONMOB_MSK ((1<<CONMOB1)|(1<<CONMOB0)) //! MaSK for CONfiguration MOb
#define DISABLE_MOB ( CANCDMOB &= (~CONMOB_MSK) )
#define Can_config_rx() { DISABLE_MOB; CANCDMOB |= (MOB_Rx_ENA << CONMOB); }
GM прокоментируй пожалуйста. Я так понял, что мне в прерывании надо каждый раз обязательно делать Can_config_rx() или я неверно перевёл? Мой английский хромает на все 5 ног.