How to load BW16 program with Arduino

謝謝 Alphi,用你的方法也成功燒錄了。但是不知道你有沒有遇到 “AT Command 聯網時模組會自動reset” 的情況呢?我和 @xidameng 都遇到過,不知道是模組的質量問題還是什麽?

看起來是FT232RL 輸出3.3V 驅動電流不夠. 其規格書上寫3.3V Vout 只有50mA 輸出.
建議不要用其他模塊IC內建輸出的3.3V給BW16.除非是電源模組
直接用5V + LDO 輸出3.3V

USB (4.75V~5.25V)-> LDO (3.3V) → BW16 (VCC)

2 Likes

如果我直接從 USB 5v 接到板子上,然後再放一個 5->3v3的 voltage regulator

這樣可以解決問題嗎?

這樣應該是ok , 我就是類似作法

1 Like

Alphi_Jiang,
I wasted a LOT of time,trying to get these modules BW16 , (B & T rtlduino),to take an upload. Finally figured it out,after much researching these forums. Until you get an actual succesful upload to device,you never really know what you should be seeing.
The ‘upload sequence’ is even kind of tricky trying to get the correct sequence,and even know the correct sequence it fails if the thiming isnt right with you relase the RST & BURN momentary buttons.

3 Likes

Yes, the release time of the reset and burn buttons is very important in determining whether to enter download mode.

@Alphi_Jiang Do you think there is a chance to simulate these button pressing operation with electric signal? with the help of TTL to USB module or some BJT/MOSFET?

it’s is possible , the key point is burn delay release after reset and only pressed reset can not entries the download mode

In that sense, we might need an extra circuit with delay function, how about a 555 timer?

delay on used RC circuit . the sequence i will use Flip-flop to detect state

2 Likes

sometimes a bit of luck + rhythms will help :rofl:

1 Like

Hi Alphi_Jiang,

After a few days,of and on,finally have the image upload to B&T rtlduino to a science.
Seems the key is,with the ambd_image_tool I do a 4k erase,then a 2048k erase.This should complete succesfully,
Then I burn,upload kmO_boot_all,bin at ###0000
burn , upload the km4_boot_all.bin at ####4000
burn, upload the km0_km4_image2.bin at #6000

I did have good luck do a simplified upload with the Method #3(using the python amebad_image_tool in Arduino IDE) in the BW16 troubleshooting guide,but then had no luck using this for about two days,Not sure what is failing it now.
Is very difficult to descern how this fails when it does.

1 Like

Do you have any display message? Or is there a success status displayed?

First of all what does the simplified upload action mean?

  1. make sure BW16 in download mode
  2. my method only clear B&T F/W . If you want to download your program you can also. But first you have to clear B&T FW
  3. if you use python upload to BW16. do you share python source code?
1 Like

Note: Using ‘Method #3’ in the "Troubleshooting flashing BW16 guide "

When using the Arduino amebad_image_tool , python,i always get “erase failed”. If i check after this message the B&T module is blank as it only shows# in the serial console. I have three B&T rtlduinos. I was able to make this work several times when first getting familiar with flashing process possibilities.
I am using the "Troubleshooting Guide for BW16 " here on Amebaiot forums.
Just trying to do everything in Linux. I did setup a Windows 10 VM on Linux,so can easily use the Windows version of the Realtek Image Tool now,which works without incident,now that I am familiar with flash process.

Thank You

2 Likes

Welcome to development for BW16 in Linux

According to your description. The first time you use ambed_image_tool, it does only show # or when you press Reset button to reset, the following message appears, which is normal
#[MODEL_LEVEL]Image2 Invaild

After that, you can use ambed_image_tool to burn km0_km4_all_image2.bin

this is mean BW16 clean B&T firmware ,but not have application code(km0_lm4_all_image2.bin)

BTW, if you have any questions, please feel free to discuss them together!

1 Like

Alphi,
believe it or not the reason i was having trouble,getting my second round of trying to get the BW16 rtlduino,to flash with ‘method 3 in the BW16 troubleshooting’ was my breadboard! It is an old breadboard that has had many non standard jumper plugs rammed into it. After looking i could feel one of the holes the jumper wire was sloppy for the two jumper connections you have to do on the rtlduino. I moved the rtlduino,ahead one hole,along with repositioning the jumper wires of course, and the simple burning method works like a charm again.
I wasted a lot of time, and by accident realized the loose jumper hole on breadboard.:slight_smile:
I wondered why this method, worked like a charm when i first tried this method,then all of a sudden a few days later it never worked!
Thanks

Brcisna,
In my experience, if the use of breadboard and jumper wire is unstable, can not guarantee always stable work, others have encountered similar problems finally use soldering to solve this problem