forked from Archive/PX4-Autopilot
s32k14x canbootloader:Change autobaud to ACK and range high to low
This commit is contained in:
parent
12b291b82f
commit
12bde36dbe
|
@ -289,9 +289,9 @@ int can_autobaud(can_speed_t *can_speed, bl_timer_id timeout)
|
||||||
int rv = CAN_ERROR;
|
int rv = CAN_ERROR;
|
||||||
|
|
||||||
while (rv == CAN_ERROR) {
|
while (rv == CAN_ERROR) {
|
||||||
for (can_speed_t speed = CAN_125KBAUD; rv == CAN_ERROR && speed <= CAN_1MBAUD; speed++) {
|
for (can_speed_t speed = CAN_1MBAUD; rv == CAN_ERROR && speed >= CAN_125KBAUD; speed--) {
|
||||||
|
|
||||||
can_init(speed, CAN_Mode_Silent);
|
can_init(speed, CAN_Mode_Normal);
|
||||||
|
|
||||||
bl_timer_id baudtimer = timer_allocate(modeTimeout | modeStarted, 600, 0);
|
bl_timer_id baudtimer = timer_allocate(modeTimeout | modeStarted, 600, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue