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
354 stars 124 forks source link

Kepping GPIO state after entering HBN0 #125

Closed Jatsekku closed 1 year ago

Jatsekku commented 1 year ago

Hi, is it possible to keep state on GPIO (at least pull-up/pull-down instead of strong drive) after entering HBN0 mode?

Jatsekku commented 1 year ago

I manged to keep pull-up of GPIO9 (BL702) by calling HBN_Hw_Pu_Pd_Cfg(1); just before entering HBN0 mode (using old bl_mcu_sdk v1.45). In my case I used GPIO9 as power source for external sensor not as wake-up source. There is small spike when entering HBN0. It can be reduce using cap.

profound1987 commented 1 year ago

Hi Jatsekku All the chips(BL602/BL702/BL616 etc.)can NOT keep the state on GPIO in HBN mode since the power domain of GPIO is powered off. You can try to use an external pull-up or pull-down resistor to achieve this.

Jatsekku commented 1 year ago

Hi @profound1987, thank you for the response. As I said before I managed to keep pull-up of GPIO9 in HBN0 mode and that's good enough for my purpose. Issue may be closed :)