Tool/software:
R7 firmware verion is 1.7.5.310, it is unstable and crashes with unknow reason. It crashes during AP scanning and also when connecting to an AP with encryption mode.
Some workarounds for these issues can make fw didn't carsh:
a. Adding print statements before Wlan_RoleUp(). // fix scan crash issue.
b. Calling Wlan_RoleDown() and Wlan_RoleUp() between scan and connect commands. // fix connecting crash issue.
We need to find the root cuase of fw crash to avoid fw crash in other cases.