Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit e52b929

Browse files
committed
Fix error when response from BG96 Dragino is failed
Signed-off-by: VannamDinh <vannam.dinh.xt@renesas.com>
1 parent ca8ad36 commit e52b929

File tree

1 file changed

+4
-2
lines changed
  • vendors/renesas/re_mcu_boards/amazon_freertos_common/network_support/re01-1500kb-ek-uart-bg96-gcc

1 file changed

+4
-2
lines changed

vendors/renesas/re_mcu_boards/amazon_freertos_common/network_support/re01-1500kb-ek-uart-bg96-gcc/bg96_driver.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ static int32_t SetupBaudrate(int32_t Change_Baudrate)
845845
case 0:
846846
/*Error, exit loop*/
847847
ret = -1;
848-
break;
848+
return ret;
849849
case 1:
850850
/*Baudrate is changed, exit loop*/
851851
return ret;
@@ -914,14 +914,16 @@ static int32_t SetupBaudrate(int32_t Change_Baudrate)
914914
}
915915
else
916916
{
917-
/*Response from BG96 Dragino is failed. Try 3 times to get send and get respone*/
917+
/*Response from BG96 Dragino is failed. Try 3 times to get send and get response*/
918918
tries ++;
919919
state = 2;
920+
bg96_serial_close();
920921
if (tries > 3)
921922
{
922923
/*Set state to 0 -> error*/
923924
state = 0;
924925
}
926+
925927
}
926928
}
927929
else

0 commit comments

Comments
 (0)