1

Good day

The problem:

  • I am trying to connect/flash/debug a Olimax STM32-E407 dev board over SWD and I am not able
  • When trying to connect, using CubeProgrammer, I get: "No STM32 Target Found"

What I have tried:

  • I have connected a ST-link V3 mini to the pinout of the the 20pin header of the Olimax board including 3.3V, GND, SWDIO (PA13/Pin7), SWCLK (PA14/Pin9) and NRST (Pin15).
  • I am powering the powering the board from a power supply into the power jack
  • All jumpers and solder bridges are in stock places.
  • I have also tried manually pulling NRST to ground and doing a full chip erase, but that has not worked either.
  • I have used these ST-link debuggers on other boards I made and it works perfectly fine
  • I have 3 Olimax boards and none of them work

Any help would he hugely appreciated.

Misha
  • 556
  • 1
  • 8
  • 25

1 Answers1

2

Debugging problems on microcontrollers have two general common methodes.

Hardware Problems:

In this part, it is highly recommended that use an oscilloscope to monitor circuit.

  • Make sure the microcontroller is powered with a correct and stable power supply.

  • Check the soldering quality and there is no short circuit on the board (especially between ground pins and other pins).

  • Check the NRST pin is high when the board is powered. Remember that this reset is active low so during programming or debugging this pin should be high. Also, check this pin is debounced with a capacitor.

  • Also you can check the JTAG pins signals with an Oscilloscope to check if the programmer device is working fine.

  • Sometimes adding a capacitor between debugging pins and GND increases the bus capacitance and solves the problem. The value of the capacitor should be found by trying.

Software Problems

  • Check the programmer driver is correctly installed on your PC.

  • Check the programming method is true(for example maybe the board is designed to be programmed with SWD, not JATG).

  • Sometimes reducing the programming clock of the programmer solved the problem.

If all of these methods didn't work and you are sure that the board is fine, probably the programmer is broken, so change the programmer with another one.

EsmaeelE
  • 2,331
  • 6
  • 22
  • 31
hpirlo
  • 133
  • 1
  • 12
  • Hi. Thank you for a really decent reply. Unfortunately I have done all of those checks already. I have crosschecked multiple board against multiple debuggers. I have even used these debuggers on the same chip, but on one of my own boards. So the board should be fine and the St-link debugger should be fine. I have ensured that the NRST pin is high on startup and then driven low. I can update the firmware on the programmer and read the bus voltage coming from the dev kit, which is the same pin as the 3V3 on the chip itself. I fear there may be something odd, like a jumper that needs to be set – Misha Jan 23 '22 at 19:24
  • I should also say that the microcontroller is confirmed to work, because the dummy code that the manufacturer puts on the board works and does what its supposed to. – Misha Jan 23 '22 at 19:46
  • I found something truly strange! I took your suggestion of hooking up my oscilloscope onto the CLK and SDIO line and see what I get. When I connect the oscilloscope to the two lines the dev board miraculously connects. As soon as I remove the probes, it stops working....? Do you have any idea why? – Misha Jan 23 '22 at 20:06
  • In the user manual of the board, it is noticed that `The board can also be programmed with Arduino IDE via USB cable with mini USB connector using board's USB-OTG1 connector`. Isn't that enough for you? Did you try to program the microcontroller via the USB port? – hpirlo Jan 23 '22 at 20:07
  • I think that when you connect the Oscilloscope's probe to the bus, it adds to the bus capacitance. so the `CLK` signal becomes smooth. Did you try to change the clock frequency? – hpirlo Jan 23 '22 at 20:11
  • The olimax datasheet says it supports SWD and JTAg debugging. It has an entire connector dedicated to it. Id like to use proper debugging features and work in the ST environment opposed to the Arduino environment. – Misha Jan 23 '22 at 20:14
  • Lower frequency unfortunately makes no difference, still fails to connect. – Misha Jan 23 '22 at 20:14
  • You said in the first comment that the `NRST` pin goes low after startup. It shouldn't be like that. It should always be high so that microcontroller can work. – hpirlo Jan 23 '22 at 20:16
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/241339/discussion-between-hpirlo-and-misha). – hpirlo Jan 23 '22 at 20:17
  • Adding a capacitor between the CLK and GND solved the issue for me. Thank you hpirlo for your help and solving this problem that this board has. – Misha Jan 23 '22 at 22:20