Open piranha771 opened 7 months ago
I use 2 CAN objects in my firmware. can1 and can2:
// Setup can1.begin(); can1.setClock(CLK_60MHz); can1.setBaudRate(125'000); can1.setMaxMB(16); can1.enableFIFO(); can1.enableFIFOInterrupt(); can1.onReceive(onCan1Receive); can2.begin(); can2.setClock(CLK_60MHz); can2.setBaudRate(250'000); can2.setMaxMB(16); can2.enableFIFO(); can2.enableFIFOInterrupt(); can2.onReceive(onCan2Receive);
After setup: can1.getBaudRate() result is 125'000
can1.getBaudRate()
After setup: can1.getBaudRate() result is 0
when a debug print is placed in the method setBaudRate you can see that this method is called multiple times with 0 when on any canbus object .setClock() is called.
setBaudRate
0
.setClock()
What did I do
I use 2 CAN objects in my firmware. can1 and can2:
Expected behavior
After setup:
can1.getBaudRate()
result is 125'000Observed behavior
After setup:
can1.getBaudRate()
result is 0Additional information:
when a debug print is placed in the method
setBaudRate
you can see that this method is called multiple times with0
when on any canbus object.setClock()
is called.