bouffalolab / bouffalo_sdk

BouffaloSDK is the IOT and MCU software development kit provided by the Bouffalo Lab Team, supports all the series of Bouffalo chips. Also it is the combination of bl_mcu_sdk and bl_iot_sdk
Apache License 2.0
349 stars 121 forks source link

How to debug M0S Dock (BL616) WiFi Function? #174

Closed nickfox-taterli closed 5 months ago

nickfox-taterli commented 9 months ago

example ~/bouffalo_sdk/examples/wifi/sta/wifi_http will stop here and will not respond to any input.

 |  _ \             / _|/ _|    | |     | |     | |
 | |_) | ___  _   _| |_| |_ __ _| | ___ | | __ _| |__
 |  _ < / _ \| | | |  _|  _/ _` | |/ _ \| |/ _` | '_ \
 | |_) | (_) | |_| | | | || (_| | | (_) | | (_| | |_) |
 |____/ \___/ \__,_|_| |_| \__,_|_|\___/|_|\__,_|_.__/

Build:11:34:23,Sep 11 2023
Copyright (c) 2022 Bouffalolab team
======== flash cfg ========
flash size 0x00400000
jedec id     0xC86016
mid              0xC8
iomode           0x04
clk delay        0x01
clk invert       0x01
read reg cmd0    0x05
read reg cmd1    0x35
write reg cmd0   0x01
write reg cmd1   0x01
qe write len     0x02
cread support    0x01
cread code       0x20
burst wrap cmd   0x77
===========================
dynamic memory init success, ocram heap size = 233 Kbyte
sig1:fffffff3
sig2:0000f2ff
cgen1:9ffffffd
bouffalolab />[I][MAIN] Starting wifi ...
[I][rfparam] xtal value 40000000
[I][rfparam] pwr_mode is bf
Empty slot:0
No written slot found
[I][rfparam] no pwr_offset in efuse
[I][rfparam] tlv wlan pwr_offset[14]: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[I][rfparam] wlan pwr_offset[14]: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,
Empty slot:0
No written slot found
[I][rfparam] no lp pwr_offset in efuse
[I][rfparam] tlv wlan lp pwr_offset[14]: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,
[I][rfparam] wlan lp pwr_offset[14]: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,
Empty slot:0
No written slot found
[I][rfparam] no bz pwr_offset in efuse
[I][rfparam] tlv bz pwr_offset[5]: 0,0,0,0,0,
[I][rfparam] bz pwr_offset[5]: 0,0,0,0,0,
[I][rfparam] pwr_11b[4]: 20,20,20,20,
[I][rfparam] pwr_11g[8]: 18,18,18,18,18,18,16,16,
[I][rfparam] pwr_11n_ht20[8]: 18,18,18,18,18,16,15,15,
[I][rfparam] pwr_11n_ht40[8]: 18,18,18,18,18,16,15,14,
[I][rfparam] pwr_11ac_vht20[10]: 18,18,18,18,18,16,15,15,15,14,
[I][rfparam] pwr_11ac_vht40[10]: 18,18,18,18,18,16,15,14,14,13,
[I][rfparam] pwr_11ac_vht80[10]: 18,18,18,18,18,15,14,13,13,12,
[I][rfparam] pwr_11ax_he20[12]: 18,18,18,18,18,16,15,15,15,14,13,13,
[I][rfparam] pwr_11ax_he40[12]: 18,18,18,18,18,16,15,14,14,13,12,12,
[I][rfparam] pwr_11ax_he80[12]: 18,18,18,18,18,15,14,13,13,12,11,11,
[I][rfparam] pwr_11ax_he160[12]: 18,18,18,18,18,15,14,13,12,11,10,10,
[I][rfparam] capcode mode is MF
Empty slot:0
No written slot found
[I][rfparam] no capcode in efuse
[I][rfparam] tlv capcode_in 36,capcode_out 36
[I][rfparam] capcode_in 36,capcode_out 36
[I][rfparam] tcal.en_tcal = 0
[I][rfparam] tcal.linear_or_follow = 1
[I][rfparam] tcal.Tchannels[5]: 2412,2427,2442,2457,2472,
[I][rfparam] tcal.Tchannel_os[5]: 180,168,163,160,157,
[I][rfparam] tcal.Tchannel_os_low[5]: 199,186,170,165,160,
[I][rfparam] tcal.Troom_os = -1
[I][rfparam] pwr_ble = 13
[I][rfparam] pwr_bt[3]: 10,8,8,
[I][rfparam] pwr_zigbee = 13
[I][rfparam] country_code = 86
[I][MAIN] PHY RF init success!
get sta mac: b4:0e:cf:36:5e:b5
get ap mac: b4:0e:cf:36:5e:b5
[I][MAIN] [APP] [EVT] wifi_event_handler, CODE_WIFI_ON_INIT_DONE
wifi_mgmr_set_country_code:code = CN
[I][MAIN] [APP] [EVT] wifi_event_handler, CODE_WIFI_ON_MGMR_DONE

example ~/bouffalo_sdk/examples/shell/shell_os/ works completely fine, I use the hardware is M0S Dock, provided by @sipeed, modify the debugging serial port to GPIO10/GPIO12, did not do other modifications, due to Sipeed does not provide WiFi related examples, so..

Looking for any ideas on how to debug this.