November 08, 2024, 08:56:51 AM

programming the olimex stm32-p152

Started by obione, March 15, 2013, 01:52:21 AM

Previous topic - Next topic

obione

Just purchased an stm32-p152 board.  Trying to erase-program from the rowley crossworks environment with a JLink. Connection to target fails with a `Loader Verify Fail` message.  It appears the board is pre-programmed with an application which configures the LCD and some of the JTAG pins seem to be shared with the LCD interface.

How do we go about programming this board with our own code if we are immediately locked out from the JTAG interface by the pre-programmed code on power-up.  I tried moving the boot0 jumper to prevent the code from starting.  This allowed me to connect to the JTAG interface, but being in the wrong mode, I was unable to go further.

The other option, to use the built-in STM32 serial bootloader on UART1 with Flash Loader Demo from ST to wipe the code also seems unavailable as UART1 pins are also used by the LCD interface and are not available to the user.

I`ve worked with STM32F103 series in the past, both with my own board designs and eval boards and the JTAG interface has always just worked.  Maybe I overlooked something regarding the STM32L1xx.

I`m stumped here.  What use is an eval board you can`t program ???

LubOlimex

Hello obione,

I have some good news for you. I found a workaround and the problem connection to STM32-P152 is purely software - the demo software messes up the levels on the JTAG lines. To remove the faulty program you need to:

1. Press and hold RESET button
2. Press and hold USER button
3. Release RESET button
4. Erase the demo. Note that if the board resets under any condition and the display turns up you will have to stop it following the three above steps again.

Generally it is IDEs job to catch a bad initialization on the JTAG lines. That would depend on the reset and how fast after reset it acts. We haven't noticed the problem since we use SWD interface for programming (and SWD data lines are not multiplexed).

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex