1

I have a board where 3 STM32 are connected to a JTAG port. The 3 STM32 are daisy chained. I am using a JLINK EDU Mini with Atollic TrueStudio IDE.

One STM32F746 is a master for the two slaves STM32L451. The NRST pin of each slave is connected to a different GPIO of the master as well as a different push button. The NRST pin of the master is connected to the NRST pin the JLINK EDU Mini as well as a push button.

The GPIOs of the master (NRST of the two slaves) are configured as open drain output with a pull-up resistor and they are set as HIGH by default.

First, I tried to flash only the initialization code for each STM32, with only the GPIOs of the master initialized. It went well and I can connect, flash and debug each of the three MCU without any problem.

Then, the main program has been flashed to the master STM32 without any problem. The main program of the first slave has been flashed to the first slave without problem but then, it became impossible to connect to any of the STM32 (master or slave).

When trying to connect, I either have "unable to connect under reset" error which I can solve by keeping the slave under reset. I also have "Unable to read XXXXXXX register which I can't solve.

To sum up, I can flash and debug any of the MCU with basic code but as soon as the code is "complex", I can't connect to any of the MCU anymore. I have to erase the MCU with JLINK Commander in order to come back to the first configuration (only GPIO initialization code).

Does anybody have any idea of what can be the issue here ? To me, it seems like some of the peripherals (SPI, I2C, UART, etc) of the slave STM32 is entering in conflict with the JTAG.

J. K.
  • 127
  • 4
  • 12
  • I'm voting to close this question because it has been **abandoned for a year and half** without sufficient information ever being provided. – Chris Stratton Dec 15 '20 at 00:17

1 Answers1

0

As you could flash the init code in the daisy-chained JTAG connection, I think connections and electronics of the JTAG connections are OK, debugger configuration, too.

From my point of view, only two guesses remain:

  • Power supply becomes insufficient when one of the controllers has activated too many of its peripherals. At least one of the controllers drops into reset (or multiple ones, alternatingly?), so the daisy chain is interrupted.

  • In the IDE projects, configuration (debugger, build, ...) for init code projects is fine, but there is a bug in the main code project?

HelpingHand
  • 116
  • 5