Author Topic: Reprogramming STM32F103R8T6 using JTAG/SWD  (Read 266 times)

0 Members and 1 Guest are viewing this topic.

Offline elliottveares

  • Contributor
  • Posts: 36
  • Country: gb
    • Elliott's Tech Show
Reprogramming STM32F103R8T6 using JTAG/SWD
« on: April 20, 2021, 09:07:12 pm »
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 a STM32F103R8T6 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 first debug the software/firmware fault and then re-program the STM32F103R8T6 chip using it's JTAG/SWD interface that 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) ground
2) 3.3V rail
3) JTAG TCK / SWCLK
4) JTAG TMS / SWDIO
5) NRST (Reset pin of STM32F103R8T6)

Any help and advice would be much appreicated?

Regards: Elliott.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 7580
  • Country: us
    • Personal site
Re: Reprogramming STM32F103R8T6 using JTAG/SWD
« Reply #1 on: April 20, 2021, 10:15:59 pm »
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.
Alex
 
The following users thanked this post: thm_w

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 2578
  • Country: ca
Re: Reprogramming STM32F103R8T6 using JTAG/SWD
« Reply #2 on: April 20, 2021, 10:55:12 pm »
Have you contacted the vendor and reported the bug to them?
 

Offline elliottveares

  • Contributor
  • Posts: 36
  • Country: gb
    • Elliott's Tech Show
Re: Reprogramming STM32F103R8T6 using JTAG/SWD
« Reply #3 on: April 22, 2021, 10:19:35 am »
I got these lights a few years ago and stupidly did not act then.
 

Offline drvtech

  • Regular Contributor
  • *
  • Posts: 78
  • Country: gb
Re: Reprogramming STM32F103R8T6 using JTAG/SWD
« Reply #4 on: April 24, 2021, 09:39:10 am »
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?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf