can does not sleep

This commit is contained in:
George Hotz 2019-06-14 12:14:03 -07:00
parent 3601212ec5
commit f9d2e8876b
1 changed files with 0 additions and 7 deletions

View File

@ -271,13 +271,6 @@ void process_can(uint8_t can_number) {
}
if (can_pop(can_queues[bus_number], &to_send)) {
if (CAN->MCR & CAN_MCR_SLEEP) {
set_can_enable(CAN, 1);
CAN->MCR &= ~(CAN_MCR_SLEEP);
CAN->MCR |= CAN_MCR_INRQ;
while((CAN->MSR & CAN_MSR_INAK) != CAN_MSR_INAK);
CAN->MCR &= ~(CAN_MCR_INRQ);
}
can_tx_cnt += 1;
// only send if we have received a packet
CAN->sTxMailBox[0].TDLR = to_send.RDLR;