Power save with BW16 arduino

Hi Everyone!
I am developing on RTL8729DN (BW16), I have loaded an example “DeepSleepMode”. I did not edit it

But i did receive the unexpected result.

I use the hardware to connect WIFI “OK”.
Please show me these miss!

Thank you so much !

Hi @Nguyen_Thien
I am not sure if I can understand your question here… from your screenshot it seems the example works with your BW16, so what is the problem?

Hi @xidameng!
That example I downloaded into BW16. But it did not deepsleep. the result is in second scereenshot. I think if it is correct after 5 seconds is wakup 1 time.


Hi @Nguyen_Thien


Please read this deepsleep example guide and understand that ONLY the following pins can be used for this feature

And unfortunately, due to design consideration and package, BW16 does NOT have all the pins that RTL8722DM has, so unfortunately, you can NOT directly use the example code written for RTL8722DM for your BW16.

For more information, you may download technical documents from the official website at,

Thanks @xidameng!
I would like deepsleep mode in pins (BW16). Please Can you guide me to edit that example?
Maybe edit BW16 hardware.
Thank you so much.

Deepsleep is not really supported on BW16 if you choose to use Arduino IDE to compile binary, bcos deepsleep example need to change the bootloader but Arduino IDE only can edit the application firmware

Thanks a lot! @xidameng.
So If i dont use Arduino IDE.
is there any way to Deepsleep mode in BW16?
Thanks again!

1 Like

Hi @Nguyen_Thien
Here is a deepsleep example from the Realtek Standard SDK,

To get started with the Standard SDK, please read the guide as follows,

Hi. @xidameng.
I see " Building the First GCC Project on Ameba-D" is a pretty difficult for me. If I use IAR IDE is it ok?
There’s more , in Arduino IDE I have connected Wifi and BLUE ok. I’m afraid I won’t be able to do it.
Can I still use the Arduino IDE after changing the bootloader? Because there is still Deepsleep in Arduino IDE example.
Please help me.I wish you a good day!

Yes, you can use IAR for this example, the IAR project is at link here,

Yes, you still can use Arduino IDE, which will wipe out the bootloader with deepsleep features when uploading

Wow! it’s really cool. Im going to use the Arduino IDE after changing the bootloader.
Now what do i do with the bootloader?
Im downloading IAR…

You can read about IAR setup in this document

Hi, @xidameng
Can I use “ImageTool_v2.3.2_AmebaD” to download BW16 through Uart?

I have only “Silicon Labs CP210x USB to UART Bridge” tool or ST-link V2.
Thanks for your enthusiasm! Because my knowledge is pretty poor.

1 Like

yes you can! make sure to download all 3 “bin” files and tick their boxes, and press button on board to enter Uart Download mode before you click the download button

1 Like

hi. @xidameng
After install and i built all Project_hp_release and Project_lp_release. Then downloaded into BW16. The program worked. But now I don’t know how to proceed.
Another thing is that I see in the program there are two pairs: Bootloader(KM0), main.c(KM0) and Bootloader(KM4), main.c(KM4). I don’t know how they work?


1 Like

Hi @xidameng
I have done Deepsleep mode already.
I tried to implement the available example but it didn’t work. how do i execute an example “BT_CONFIG”?

Please help me!


Hi, what matters here are only 3 binary files, namely, km0_boot_all.bin (small core’s bootloader), km4_boot_all.bin(big core’s bootloader) and km0_km4_image2.bin(your application program which contains programs in main.c)

1 Like

There are two ways to play BT_CONFIG,

  1. Use Arduino IDE, go to example and look for BLEWiFiConfig
  2. Use Standard SDK and follow instructions on the application notes under Bluetooth chapter to set up the environment and then check out AI-Thinker’s website for their instructions on how to use BT Config, links are as follows,


But I cant use Deepsleep mode with Arduino IDE.

1 Like

Before I have played BLEWiFiConfig example on Arduino IDE. But having Deepsleep problem.

Does the Standard SDK have to follow the “29.2.2 IAR Project” steps?