Skip to content

Commit

Permalink
Power saving: wake on RX and don't print durint IRQ
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiasini committed Apr 9, 2019
1 parent 9540db7 commit f383eee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions board/drivers/can.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ void process_can(uint8_t can_number) {
// CAN receive handlers
// blink blue when we are receiving CAN messages
void can_rx(uint8_t can_number) {
#ifdef PANDA
power_save_reset_timer();
#endif
CAN_TypeDef *CAN = CANIF_FROM_CAN_NUM(can_number);
uint8_t bus_number = BUS_NUM_FROM_CAN_NUM(can_number);
while (CAN->RF0R & CAN_RF0R_FMP0) {
Expand Down
3 changes: 0 additions & 3 deletions board/power_saving.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ void power_save_init(void) {
}

void TIM6_DAC_IRQHandler(void) {
puts("TIM6 ");
putui(TIM6->SR);
puts("\n");
//Timeout switch to power saving mode.
if (TIM6->SR & TIM_SR_UIF) {
TIM6->SR = 0;
Expand Down

0 comments on commit f383eee

Please sign in to comment.