cancel
Showing results for 
Search instead for 
Did you mean: 

What im doing wrong while programming?

Jakub B
Associate III
Posted on September 25, 2017 at 13:26

Hi,

I try to make a custom board and i have problem programming it from discovery.

I'm using stm32f030c8t6 like in picture below and stm32f0308-disco. I have no problem programming stm32 on disco board and my program works. When i try to program custom board stlink/keil/flash loader doesnt see my board.

All elements on picture are soldered beside of oscilator. Rest of lines are inputs and outputs which are not soldered.

SV1 is port for using SWD, SV2 is port for using uart. JP1 is jumper for BOOT0. Jumpers JP2-JP5 are relevant after programming (its choosing of adres number later).

I try all kinds of combinations but nothing works. Power is connected from discovery: 5V, VDDtarget from board (3V), CN2 jumpers from disco disconnected, GND connected from SWD port and on SV2. Tried with jumper on BOOT0 and without. With VDDtarget to 3V and GND.

Can you tell me if something is wrong with my design or its rather broken stm32f0?

Maybe some pins i left unconnected?

Anything you can advise?

0690X00000608MOQAY.png
6 REPLIES 6
Posted on September 25, 2017 at 14:12

Hello!

I try all kinds of combinations but nothing works. Power is connected from discovery: 5V, VDDtarget from board (3V), CN2 jumpers from disco disconnected, GND connected from SWD port and on SV2. Tried with jumper on BOOT0 and without. With VDDtarget to 3V and GND.

Discovery can not provide Power via CN3 .  In this discovery board is just grounded by 10k res.

0690X00000608MdQAI.png0690X00000608MYQAY.png

So you must power your board by different way and connect the PA13, PA14, GND and NRST pins to CN3

Regards

vf

Posted on September 25, 2017 at 14:16

I always connect VDD target to pin 1 on my board (3V) and power my custom board with 5V via SV2 (there is stabilizer after it to 3V3)  which is connected to VDD of custom board. I know discovery pin 1 is not powering my board but is to measure voltage

Posted on September 25, 2017 at 16:52

Make sure the SWD pins are disconnected from the target on the DISCO

Review pin numbering and orientation of part as placed.

Review netlist and gerbers, make sure that power and ground have connectivity, and not island. Do DRC and look at all nets.

Review and unpopulated board, and also components as placed.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Jakub B
Associate III
Posted on September 26, 2017 at 07:56

I disconnected jumpers on disco as well as solder bridges  (tried with and without). All connections are in place and when checking with multimeter i touched pins from side and not from top so as not to connect unconneted pins to see if i have a hole. Power and GND are connected all the way to mcu.

Can You see any errors on board?

Posted on September 26, 2017 at 19:44

From the limited view it looks ok, I'm not looking to dig through the manuals to confirm the pin numbers, and I don't have any design files to review nets, etc.

Check the state of NRST, is it always low.

Check if you can talk to the System Loader via USART1 (PA9/PA10). Do you get a response to a 0x7F data pattern sent at 9600 8E1 when the part is reset with BOOT0 pulled high.

Check excessive current draw.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Jakub B
Associate III
Posted on September 27, 2017 at 20:48

Hi again. I solved my case. Thank you for yor help.

First of all i tried talking via uart like you said but i was recieving something wierd... neverthless i had response so mcu worked. Yay good news .

I started desoldering some compoents to check if something is interfering with transmision. Looks like my power supply had to many elements and coil was doing some problems and programming via SWD started to work... BUT only via st link utility. I cant program fresh, unused mcu from keil and from uart (bootlader something from st). After that i can program or debug however i want.

Any advice on that? I might need to mass produce my board and programing via uart would be faster and use less space on board.

But it works !!

Tommorow i'm doing more tests. Found out that my jumpers 2-4 (that supposed to be adress choice) had to be reprogrammed to pull-down (from pull-up) and resistors to the ground desoldered for it to work.