Skip to content

Commit

Permalink
Disable interrupt for MB if there are no frames to send
Browse files Browse the repository at this point in the history
This patch was suggested by bodynek and fixes a problem where too many interrupts will trigger for no reason.
  • Loading branch information
collin80 committed Aug 12, 2013
1 parent 3021ab4 commit a4aa020
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions due_can.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,9 @@ void CANRaw::mailbox_int_handler(uint8_t mb, uint32_t ul_status) {
global_send_transfer_cmd((0x1u << mb));
tx_buffer_head = (tx_buffer_head + 1) % SIZE_TX_BUFFER;
}
else {
disable_interrupt(0x01 << mb);
}
break;
case 5: //producer - technically still a transmit buffer
break;
Expand Down

0 comments on commit a4aa020

Please sign in to comment.