teachop / FlexCAN_Library

Arduino library for CAN on Teensy 3.1
The Unlicense
154 stars 122 forks source link

freeze mode #31

Open tonton81 opened 5 years ago

tonton81 commented 5 years ago

First call of setup assumes header was loaded and controller is still in freeze mode.

A second call of setup or a setFilter AFTER the setup() is called, a hard fault is occured because you're writing to the RXFGMASK outside of freeze mode.

I suggest you wrap entering and exiting freezemode around both setup() and setFilter() RXFGMASK sets to correct the hard fault condition