Reprogramming STM32F103R8T6 using JTAG/SWD - Page 1
Forum section: electronics / beginners

author: elliottveares
author_rank: Contributor
timestamp: April 20, 2021, 09:07:12 pm
content: Hi all, hope this is the right place on the forum for this, if not, could one point me to the correct forum section.I have 4 x Marq Gesture Sport 100 DMX controlled moving head lights. (DMX or DMX512 by it's full name is a stage lighting control protocol based on the RS-485 serial protocol.)Like many DMX controller stage/disco lights, they have a number of settings that can be set on them using a few buttons and a basic LCD.My issue with them, is that the setting for the Pan and Tilt range do not survive power loss unlike the other settings (i.e. LCD inversion, DMX channel, sub modes, etc...) that do.I believe this to be a software/firmware bug, so I took one of the lights apart to find aSTM32F103R8T6 microprocessor, what I believe to be the main control chip and where the problem lies. The only other chips I could see were LED drivers, stepper motor drivers, voltage regulators, a RS-485 Interface IC, and a 8 pin chip with poor markings what I think is a LM358 OpAmp.Is it possible and if so, to firstdebug the software/firmware fault and then re-program the STM32F103R8T6 chip using it's JTAG/SWD interfacethat I have identified or do I need to do it by some other means to fix the issue and if so, how? For serial, I only have knowledge in the basic RS232 type serial interface when working with things like Network switches and other old computer peripherals.I am assuming I will need to by some sort of USB to JTAG debugging/reprogramming interface. An example/link to one would be helpful along with what software I would use to interface with the STM32F103R8T6 chip in order to debug and reprogram it.I have identified and soldered wires to the following pins (via a unused/debug header on the PCB) of the STM32F103R8T6 chip:1) ground2) 3.3V rail3) JTAG TCK / SWCLK4) JTAG TMS / SWDIO5) NRST (Reset pin of STM32F103R8T6)Any help and advice would be much appreicated?Regards: Elliott.

author: ataradov
author_rank: Super Contributor
timestamp: April 20, 2021, 10:15:59 pm
content: Programming interface is the least of your concerns. If the chip is locked from readout (likely for a commercial product), then there is very little you can do. Even if you manage to read out the binary firmware, fixing your issue is a non-trivial task and would require a lot of time and effort. Realistically, if you don't already have an SWD programmer of some sort, you are not likely to do that by yourself.

author: thm_w
author_rank: Super Contributor
timestamp: April 20, 2021, 10:55:12 pm
content: Have you contacted the vendor and reported the bug to them?

author: elliottveares
author_rank: Contributor
timestamp: April 22, 2021, 10:19:35 am
content: I got these lights a few years ago and stupidly did not act then.

author: drvtech
author_rank: Regular Contributor
timestamp: April 24, 2021, 09:39:10 am
content: This is not a bug - it's just how moving lights work! As I understand it you want to be able to switch the unit on and have it just point somewhere fixed, rather than controlling its position from a lighting desk. In addition to getting the pan and tilt where you want them, how were you proposing to bring up the dimmer channel to actually get some light out of it?A more practical solution is either to buy a simple desk, or, if you really want to learn about microcontrollers, build yourself something to do the particular job you want.What is your overall aim? Is this for use in a bedroom or a nightclub or a theatrical venue?