Closed epsi1on closed 1 month ago
You can see from the description: https://github.com/iliasam/Laser_tape_reverse_engineering/wiki/Known-modules that B2A has STM32G03/04x MCU (I don't know real type). U85 modules have STM32F03x MCU. So current firmware is need to be ported. Firmware for U85 is written with SPL, while there is no SPL for STM32G.
Hello, and thanks for the reply. While there is no SPL for the STM32G, do you suggest that HAL library be used for porting the firmware? I'm very interested to port firmware.
Yes.
Thanks for reply. Can this document be used for programming the B2A module?
I'm using such device for programming (seller claimed that it is not chip fake one, he said it have ID which i'm not sure what it is.)
Maybe yes. I hope, you have seen this - " You programmer must have a special reset pin (cheap Chinese St-Link dongles don't have it)." You programmer don't have it.
You can try to use bootloader.
nothing special. ~Thanks for the reply.~ ~Can i create a backup of device firmware in order to be able to restore it?~ ~Also do you suggest me to get one of these programmers~ ~I have a USB to TTL too converter by the way.~ ~Thank you again~ ~i'm interested to get one for this and for future usages, unless it doesn't make any help for me now~
Hi, I've got one of these programmers
First question is it intended that NRST pin on this programmer work?
I 've connected the module to programmer like this:
Connect "PWRON" line to VBAT line - to power on module.
You need to connect SWDIO, SWCLK, NRST, GND to your programmer (ST-Link for example).
Also it is recommended to connect VBAT to TVCC (target VCC) input pin if your programmer has it (like original St-Link).
Notice that NRST must be connected! You programmer must have a special reset pin (cheap Chinese St-Link dongles don't have it).
You need to select "Connect under Reset" and Reset mode: "Hardware Reset" in options of your programmer software.
This method is recommending if you are planning to change source code.
but i've got following error:
would be thankfull if you give me some points on how to fix the problem
Configuration of the CubeProgrammer utility is looking OK. Target Voltage = 2.9V is looking too small. How do you connected power from module to programmer? (How pin1 of the programmer is connected?) How you are powering your module? What is the voltage at si5351 (its pin1 is VDD)?
Thanks for the reply. I've did another test.
Here is how things are connected:
B2A | STLINK |
---|---|
1-SWDIO | 7-SWDIO |
2-SWCLK | 9-SWCLK |
3-RX | Not Connect |
4-NRST | 15-RESET |
5-BOOT0 | Not Connect |
6-GND | 4- GND |
7-PWRON | 1- VTREF |
8-Vbat | 1-VTREF |
And here is what i do assume pinout of my stlink (according to utmel.com)
The voltage at pin1 (VDD) of si5351 is 3.26V
Thanks
Another odd thing is the laser diode on module is constantly ON (but seems not with full power) after i did connect module to STlink Thanks
"How you are powering your module?" What is Vbat value? What was the original battery of your module?
Check this point - If it is 3.3V, so this is MCU VDD, you can try to use is as source for programmer VTref.
Hi, Thanks for reply.
"How you are powering your module?"
Not sure, two pins on B2A module (7-PWRON and 8-Vbat) are connected to VTRef an nowhere else. no other batteries etc.
What is Vbat value?
You mean the voltage of VBat
pin on module?
What was the original battery of your module?
A*uman
(the t
is replaced by *
)
651720 3.7v
0.82Wh 2402
Check this point - If it is 3.3V, so this is MCU VDD, you can try to use is as source for programmer VTref.
Multi meter said it is 3.25v, so i think it is 3.3v. but could you please give me some info on how can I connect it into VTref?
Thanks
VTref of the st-link programmer is INPUT! it is power for internal programmer voltage-level converters. So you need to have external power source with V=3.7-4.2V. Maybe 3.3V will be suitable, but I'm not sure. It must be connected to Vbat and GND of the b2a module.
PWRON of b2a also must be connected to that power source. VTref is better to be connected to MCU VDD with 3.3V.
Looks like that now your module is powered by voltage leakage through data pins.
You can try co connect pins 1 and pin 19 of your programmer, and do not connect anything other to that pins, so programmer will have 3.3V for its internal voltage-level converters. https://i.sstatic.net/rIMNJ.jpg
Thanks for information, and sorry for bothering you.
i did some changes, now a 3.7v battery is also connected like this:
B2A | STLINK |
---|---|
1-SWDIO | 7-SWDIO |
2-SWCLK | 9-SWCLK |
3-RX | Not Connect |
4-NRST | 15-RESET |
5-BOOT0 | Not Connect |
6-GND | 4- GND |
MCU VDD (solder new wire to the cap pin) | Vtref |
B2A | Battery |
---|---|
6-GND | GND |
7-PWRON | +3.7v |
8-VBAT | +3.7v |
Voltage at VBATT and PWRON are 3.66v voltage at MCU VDD (and VTref pin on STLINK) is 3.26v a new wire from MCU VDD is soldered to capacitor and other end to vtref pin on STLink.
but still get message:
"voltage at MCU VDD (and VTref pin on STLINK) is 3.26v" But utility is writing that voltage is 2.99-3.01V. This is strange for me.
Did a retry with boot0 and UART method, got this error: Can it be some sort of reverse engineering protection?
I don't think so. Your MCU is silent. Looks like STM made changes at STM32G bootloader activation: https://community.st.com/t5/stm32-mcus-products/has-anyone-gotten-the-boot0-pin-to-work-on-an-stm32g071-solved/m-p/338772 https://electronics.stackexchange.com/questions/598336/stm32g030-boot0-pin-swclk Maybe connecting SWCLK to 3.3V can help, maybe not.
Is MCU of your module still working without connections, when LCD with keys connected?
hi
Is MCU of your module still working without connections, when LCD with keys connected?
Yes, when i remove programmer and connect battery and keypad to the module, it works just fine as before. Let me try to connect SWCLK to 3v3 and retry... Thanks for tips, i really appreciate it... Have a nice day
just another question which is not related to the µc, would be thankful if you clear me.
in this file, at the Laser Diode D3, have a question about voltage at it's anode. I think voltage at D3 anode is sin wave, but what is the min and max in volt scale? i think it should have offset from zero but not sure.
Thanks again
" but what is the min and max in volt scale?" Sorry, but I can't say - I don't have a suitable oscilloscope when I was doing experiments with that module. Laser diode circuit is generating voltage offset - it is near 2V.
Lets close this issue for now. Thanks for all information.
Hello, I have a module marked as
B2A
as in image. in known modules it is noted that a model namedMB2A
is not supported with this firmware. but theB2A
module's visuals is very similar to85A
module which is supported by the firmware. Here areB2A
images:and here is
85A
and85B
modules: (link) TheB2A
have an extra chip regard to85A
which i think it contains accelerometer (to show angle relative to gravity).Do you think it is supported? Thanks