cancel
Showing results for 
Search instead for 
Did you mean: 

Fresh CPUs can't be programmed serially until they have seen JTAG.

andy239955_st
Associate II
Posted on May 14, 2009 at 06:56

Fresh CPUs can't be programmed serially until they have seen JTAG.

5 REPLIES 5
andy239955_st
Associate II
Posted on May 17, 2011 at 13:11

Hi everyone,

I've just discovered a problem with a new STM32F103 based board and I wonder if someone can help me.

The board has both a JTAG socket and a serial header connected to USART1. Most of my development upto now has been though the JTAG socket (with IAR's J-Link) but now I want to set up a small batch of boards using the USART and ''Flash Loader Demonstrator'' (V1.3).

If I take a board I've been using with the JTAG, plug in the serial cable, but a jumper on the BOOT0 Pin and power it up (with JTAG removed), I can program the board using the ''Flash Loader Demonstrator'' (FLD) without any problem.

However, if I take a fresh board and try and use FLD, FLD can't see the board. If I take that same board, connect the JTAG lead and the BOOT0 jumper and power it up, I will then be able to program it using the FLD, even having powered down, removed the JTAG and powered up again. In fact, just having been powered up once with the JTAG lead and jumper on is enough to ''cure'' that board and from that point on I will always be able to use FLD to program it without the JTAG lead being present.

Can anyone shed any light onto this problem?

Thanks.

Andy.

andreas2
Associate II
Posted on May 17, 2011 at 13:11

Is the BOOT0 or BOOT1 pin floating? Then it could possibly keep charge after being once set to the correct level. Ok, it's a long shot if you say you can power down/up the board and it still works, but if you only reset it this could be the reason. Note that if you're using the boot loader, the BOOT1 pin will also have to be correct.

ivanov-i
Associate II
Posted on May 17, 2011 at 13:11

There is a bug of the FLD - it can not communicate with the target unless the COM port has been opened before it by some other program (like HyperTerminal). After that the loader operates correctly.

Beside this we haven't had any problems to program the chips over USART.

rael
Associate II
Posted on May 17, 2011 at 13:11

I have a board of my own design using an STM32F103VBT

I don't use JTAG at all, but it programs fine from new with Serial on USART#1.

Neither TX or RX have resistors wired, but I do have a pull down on my CTS line from the micro to the MAX202.

I'm having a different problem,

I can't get JTAG to release GPIOB pns 3 & 4 for push-pull driving :|

I've done the

GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE);

fix, and other pins on the port will drive out, but not 3 & 4.

I'm wondering if I have to temporarily enable a clock somewhere to enable the JTAG deactivation to cycle off ? :o

andy239955_st
Associate II
Posted on May 17, 2011 at 13:11

Hi Folks,

Thanks for the replies and suggestions. It's looking as though we're having problems with the reset circuit.

I'll post here when we've got to the bottom of it.

Thanks again.