Electronics > Repair

Repair Help for APC UPS BR1500G - F06 error (FIXED!!)

<< < (9/13) > >>

fmashockie:
Hey everyone - another update regarding this APC UPS BR1500G repair.  And unsurprisingly, it continues to be a stubborn bastard!  |O

I finally got in the items I needed to perform the flash of the micro - a FTDI UART to USB cable (datasheet attached), a replacement micro (it is a STMF102C8, datasheet attached) and I installed the STMCubeProgrammer software.  I installed the drivers for the FTDI cable as well from their website.  I also got a LQFP48 adapter board in case I had to remove the chip from circuit to flash it. 

I read the ST application note 2606 to get info on the bootloader function for this chip.  Here's how I set it up:
-Connected the VCC 3.3V (red) wire from the FTDI cable to VDD on micro
-Connected ground (black) wire from FTDI cable to VSS on micro
-tied BOOT0 (pin 44) on micro high (3.3V)
-tied BOOT1 (pin 20) on micro low (gnd)
-Connected the TXD (orange) wire from FTDI cable to PA9/USART1_TX (pin 30) on micro
-Connected the RXD (yellow) wire from FTDI calbe to PA10/USART1_RX (pin 31) on micro
-I selected 'UART' in STMCube software and checked to ensure serial configs matched (see photo attached).

Of course, once I was finished connecting everything, I tried to connect and an error message popped up saying 'Error activating device - check bootloader and serial configs and reset'.  I double checked everything and powered cycled my setup and tried again - same result.  I tried tying the NRST pin low to see if that would reset it, but that still gave me the same error. I tried connecting to the micro both in-circuit and out of circuit (note - I did verify that pin 27 is indeed shorted to VDD like I mentioned before!). 

So now I've reached another brick wall again!  I was hoping you guys could take a look at my set-up to make sure I'm not missing anything (I've attached photos as well).  Any help would be greatly appreciated!  Also, if the micro is read-protected by the manufacturer, would this explain the error message I am getting?

Thanks in advance as always!!

RLP:
Sounds like you're close!

I remember being able to connect to the device and then view status of each flash region (protected/unprotected), so I imagine you should be able to connect even if it is read protected. Unless there is some separate protection setting that disables the bootloader entirely... that would be documented somewhere if it exists.

Do TX and RX need to be swapped? I might be missing something but I'd usually connect TX of the adapter to RX of the chip and vice versa.

Also my quick skim of AN2606 suggests the bootloader will auto-detect the baud rate - can you try lower baud rates than 115200?

fmashockie:
Once again RLP you were spot on!

So I did indeed have the TXD and RXD wires reversed.  I also lowered the baud rate (115200 is the max according to application notes) and set parity to even.  After I fixed all that, I was able to get the original micro connected to the STMCubeProgrammer software no problem!  It appeared to read all the flash memory successfully.  So I extracted the flash memory and saved it to my PC.  I then desoldered the original chip from the LQFP48 adapter board and soldered in a brand new micro.  I made all the connections, configured the bootloader, and connected to the chip.  I downloaded the flash memory I saved from the original chip onto the new micro.  I verified the files were exactly the same.  Then I desoldered the new chip from the adapter board and soldered it onto the UPS PCB.  I powered it up and..... nothing happened...  :palm:

I verified the display was getting power.  It definitely appears that the new micro was not programmed properly.  I then connected the new micro to the STMCubeProgrammer again (thank god it worked in-circuit because I did not feel like desoldering it again!) to verify the flash memory was there and it is. 

Is there something else that I am missing as far as programming the chip?  Some crucial step perhaps? The only thing that seems out of the ordinary (maybe?) is that a few of the address lines in the flash memory have all zeros (see photo attached).  But that is how the flash memory from the original micro read as well.  Sorry, if I am not giving enough info - this is my first time attempting this.  I'll post in the microcontroller forum as well.  But any help you can provide would be greatly appreciated! I can't thank everyone enough so far!! Also, here's a video below summarizing where I'm at so far.  Thanks again!!

darkspr1te:
I replied in the other thread but will post here too, you didnt download the full firmware so you need to reattach the original chip to the dev board and dump it,
 then check j40 for PA13/PA14 pins (pins 34/37 of mcu) as J40 looks like a programming header and you should be able to flash in circuit
when you dump original firmware set the read size to 0xffffff and it should read the whole chip.






darkspr1te

DavidAlfa:
Better don't read 0xffffff, might crash or cause other issues later, I remember having issues in ST-Link utility, getting frozen/unresponsive after getting a bit over the limit.
Do the correct thing instead, we all know C8/CB parts have 128KB, so 0x20000 is the size.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod