We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 813218d commit 80051beCopy full SHA for 80051be
board/drivers/canbitbang.h
@@ -137,12 +137,14 @@ void TIM4_IRQHandler(void) {
137
puts("ERR: bus driven at ");
138
puth(gmlan_sending);
139
puts("\n");
140
- gmlan_sendmax = -1; // exit
+ // reset sender (retry after 7 silent)
141
+ gmlan_silent_count = 0;
142
+ gmlan_sending = 0;
143
} else {
144
set_bitbanged_gmlan(pkt_stuffed[gmlan_sending]);
145
gmlan_sending++;
146
}
- if (gmlan_sending == gmlan_sendmax || gmlan_sendmax == -1) {
147
+ if (gmlan_sending == gmlan_sendmax) {
148
set_bitbanged_gmlan(1); // recessive
149
set_gpio_mode(GPIOB, 13, MODE_INPUT);
150
TIM4->DIER = 0; // no update interrupt
0 commit comments