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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.