-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Description of defect
When setting up the CAN bus with TxIrq
callback to indicate is has been sent (see example below), the callback is never called. Sending is successful as i can see on the other side. RxIrq
works as intended
Target(s) affected by this defect ?
STM32G474
Toolchain(s) (name and version) displaying this defect ?
GCC-ARM 9.3.1
What version of Mbed-os are you using (tag or sha) ?
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
mbed-cli 1.10.1
How is this defect reproduced ?
CAN can(PB_8, PB_9);
DigitalOut canStandby(PB_7, 0);
DigitalOut led(PB_14, 1);
void canTxDone() { // ISR
led = !led;
}
int main() {
can.frequency(250000);
can.mode(CAN::Normal);
can.attach(&canTxDone, CAN::TxIrq);
while (1) {
CANMessage msg;
msg.id = 0;
msg.id |= 6 << 26; // priority
msg.id |= 0xFF00 << 8; // SPN
msg.id |= 0xA0; // SA
msg.len = 8;
msg.type = CANData;
msg.format = CANExtended;
memset(msg.data, 0, 8);
can.write(msg);
ThisThread::sleep_for(1s);
}
}