# Help needed to erase the default firmware on a standalone BW16

**URL:** <https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739>\
**Category:** SDK\
**Tags:** evb-bw16\
**Created:** [August 13, 2021, 5:11pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739 "2021-08-13T17:11:27Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 13, 2021, 5:11pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/1 "2021-08-13T17:11:27Z")

</div>

Hi,  
So now that I’ve successfuly erased the default firmware on a module (green PCB). I want to do the same with a standalone BW16.  
I’ve wired similarly to this setup : (because I followed [this tutorial](https://www.instructables.com/RTL8720DN/)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/1X/8b0ef4ced09c948a80989258847466924c2a073f.jpeg)

I’m able to get the B&T logo. But I don’t kown how to get access to the special shell where I can type AT Commands.

I’ve tried to use image tool to erase the firmware but it didn’t work.

Any ideas?

---

<div class="post-metadata">

**Author:** ![wyy](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wyy](https://forum.amebaiot.com/u/wyy)\
**Post date:** [August 14, 2021, 3:50pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/2 "2021-08-14T15:50:10Z")

</div>

The B&T logo should only appear on serial\_Tx and serial\_Rx, while the image upload and image erase function operates over log\_Tx and log\_Rx, so those two pins should be connected. Then enter image upload mode by connecting log\_Tx to GND and resetting.

---

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 14, 2021, 5:32pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/3 "2021-08-14T17:32:42Z")

</div>

Yes those two pins and only those two pins are connected (of course VCC and GND are also connected)  
I did the procedure multiple times  
but all I got is this:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/1X/66fcd6bb0302020a79529fe8d406da1bedbd8208.png)  
it stopped when I sent things.  
To be clear this is a pic of my setup:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/1X/4895bd699c450a3ee4dcbce2d1c023b12a1c0d3a.jpeg)

---

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 14, 2021, 5:48pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/4 "2021-08-14T17:48:31Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/1X/c2b8cccdc9faaf52ffa970963c2bf172d486e629.png)  
Also this could help, it seem like the B&T message is accompanied by others information that I didn’t have on the first one

---

<div class="post-metadata">

**Author:** ![wyy](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wyy](https://forum.amebaiot.com/u/wyy)\
**Post date:** [August 14, 2021, 5:54pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/5 "2021-08-14T17:54:56Z")

</div>

The question marks should be normal. The chip sends NAK over UART when it is waiting in download mode, which shows up as unprintable characters.  
the additional information with the B&T logo shows that the B&T image hardfaults after booting. I suspect that this may be due to an incomplete flash erase, do you know if this appeared the first time, before you tried erasing it?  
Another possibility is that your USB-UART adapter is unable to supply sufficient current on the 3.3V line, you might want to try a standalone power supply, or grab the 3.3V from other development boards.  
Also, how does the flash erase procedure fail? are there any error messages?

---

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 15, 2021, 7:49am UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/6 "2021-08-15T07:49:21Z")

</div>

Hi,  
I don’t remember if I was seeing this error message when I first plugged the device.  
In others case this is the screenshot of the image tool doing flash erase (I tried many Baud rates)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/1X/29a7e72de68869c6b4c08c9fd1f9c1ce2dc3dd6b.png)

I use the FT232 UART to USB adapter  
I tried to connect the 3.3V line of the BW16 to the 3.3V line of the not standalone development board along with ground  
I also tried to connect the same 3.3V to a external power supply along with ground  
But it failed  
(note: when in use with the external PS the BW16 sometimes keep resetings and sometimes send B&T logo with no error message )  
I don’t known if my UART adapter is designed to be powered with the 5V of its USB and at the same time have the 3.3V line plugged via an external PS.  
It may well be because of the 3.3V supply. I will try to do different setup.  
Do you have advice for the wiring?

---

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 15, 2021, 9:16am UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/7 "2021-08-15T09:16:31Z")

</div>

sometimes, when it’s not printing failure with B&T logo it’s send : AT\_UART\_CONF: 38400,8,1,0,0

---

<div class="post-metadata">

**Author:** ![wyy](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wyy](https://forum.amebaiot.com/u/wyy)\
**Post date:** [August 16, 2021, 3:25am UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/8 "2021-08-16T03:25:35Z")

</div>

your wiring should look similar to this:

 ![Screenshot 2021-08-16 111832](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/1X/688a6058ca94620f7bb70f04121fb73193c06620.png)

please try this out and let me know the results.

---

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 16, 2021, 2:26pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/9 "2021-08-16T14:26:03Z")

</div>

Ok, thanks with this wiring it’s working great, now I don’t have any error dump on A&T logo; I will try to flash

---

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 16, 2021, 3:01pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/10 "2021-08-16T15:01:31Z")

</div>

It’s not working I don’t have access to the AT command prompt

what’s the meaning of " AT\_UART\_CONF: 38400,8,1,0,0" apart from the obvious serial baud rate what’s the meaning of the others numbers.

---

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 16, 2021, 4:39pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/11 "2021-08-16T16:39:40Z")

</div>

@wyy  
ok so I’m now to the point where Image Tool is not outputing any errors it’s just flashing very quickly just say:  
COM3 is open successfully!  
Flash erase is processing…  
COM3 is closed successfully!  
no error of “clear flash status register fail”

So I guess it’s a step in the right direction  
but it’s still not working because the B&T logo it still there.

---

<div class="post-metadata">

**Author:** ![wyy](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wyy](https://forum.amebaiot.com/u/wyy)\
**Post date:** [August 16, 2021, 5:10pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/12 "2021-08-16T17:10:35Z")

</div>

a few questions:  
Is the B&T firmware still hardfaulting after boot?  
What chip is on the USB-UART adapter, and what baudrate are you using in the image tool?  
Perhaps you can try erasing 4MB of flash?

---

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 16, 2021, 5:30pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/13 "2021-08-16T17:30:46Z")

</div>

No the B&T isn’t hardfaulting after boot thanks to proper wiring with the power supply  
I’m using the FT 232 USB-UART adapter  
I’m using 115200 as a baudrate in the image tool like instructed by [this tutorial](https://forum.amebaiot.com/t/resources-bw16-troubleshooting-guide/678)

---

<div class="post-metadata">

**Author:** ![wyy](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wyy](https://forum.amebaiot.com/u/wyy)\
**Post date:** [August 16, 2021, 5:37pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/14 "2021-08-16T17:37:49Z")

</div>

I am not sure why the flash erase still seems to be failing, you might want to try out the other methods and see if those work.

---

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 16, 2021, 5:56pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/15 "2021-08-16T17:56:57Z")

</div>

Since I don’t have access the the AT command prompt I don’t see how the first method will work.

I think the key is to access the AT cmd prompt. So could I access it ?

---

<div class="post-metadata">

**Author:** ![wyy](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wyy](https://forum.amebaiot.com/u/wyy)\
**Post date:** [August 16, 2021, 6:00pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/16 "2021-08-16T18:00:12Z")

</div>

the AT cmd prompt should be avaliable at the same UART port as the B&T logo and messages?  
might as well try both UART ports

---

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 16, 2021, 7:57pm UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/17 "2021-08-16T19:57:30Z")

</div>

Well, when I’m just connected to the Serial via PB1 and PB2 I’m getting the AT command prompt so definitively not the same as the B&T logo

---

<div class="post-metadata">

**Author:** ![lefuturiste](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/lefuturiste/32/582_2.png) [@lefuturiste](https://forum.amebaiot.com/u/lefuturiste)\
**Post date:** [August 18, 2021, 9:20am UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/19 "2021-08-18T09:20:01Z")

</div>

Ok so I finally managed to flash a standalone BW16.  
And without even using windows.  
I got access to the AT command interface via Serial PB1 & PB2 baudrate 38400  
I used the Over the Air method : connected to my WiFi and on my linux issued the command :  
`cat OTA.bin | nc -lvnp 8002 `  
to spawn a TCP server to send the firmware.  
It worked perfectly.

Thanks for your help 🙂

---

<div class="post-metadata">

**Author:** ![wyy](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wyy](https://forum.amebaiot.com/u/wyy)\
**Post date:** [August 18, 2021, 9:34am UTC](https://forum.amebaiot.com/t/help-needed-to-erase-the-default-firmware-on-a-standalone-bw16/739/20 "2021-08-18T09:34:11Z")

</div>

good to hear that it finally worked for you.
