Skip to content

Commit

Permalink
autoretry on chime
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Jun 15, 2018
1 parent 813218d commit 80051be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions board/drivers/canbitbang.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@ void TIM4_IRQHandler(void) {
puts("ERR: bus driven at ");
puth(gmlan_sending);
puts("\n");
gmlan_sendmax = -1; // exit
// reset sender (retry after 7 silent)
gmlan_silent_count = 0;
gmlan_sending = 0;
} else {
set_bitbanged_gmlan(pkt_stuffed[gmlan_sending]);
gmlan_sending++;
}
if (gmlan_sending == gmlan_sendmax || gmlan_sendmax == -1) {
if (gmlan_sending == gmlan_sendmax) {
set_bitbanged_gmlan(1); // recessive
set_gpio_mode(GPIOB, 13, MODE_INPUT);
TIM4->DIER = 0; // no update interrupt
Expand Down

0 comments on commit 80051be

Please sign in to comment.