2019-11-14 03:49 AM
I designed a board based on an STM32F303CC and I am unable to upload any code to it. I'm using STM32CubeIDE with an ST-Link/V2 programmer. I've connected Pin 7 to DIO and Pin 9 to CLK. The board uses USB for it's 5V power supply which is transformed down to VDD = VBAT = 3.312 V. NRST uses the internal pull-up resistor and measures 3.305V. Boot0 is strapped to GND.
I get error message: (4) "No device found on target".
I connected the GND of the board to one of the GND pins on the JTAG connector of the ST-Link/V2, still error (4). I connected RESET (Pin 15) of the ST-Link to NJTRST on the board connector, still error (4).
I connected NRST of the microcontroller to 3.3V (Pin1) of the ST-Link through a jumper wire, and I get error message: (255) "Unknown, please check power and cabling to target".
I connected 3.3V (Pin1) of the ST_link to VDD/VBAT on the board through a jumper wire, again error (255).
PFA my schematic, all the resistors and resistor arrays are 820 Ohm, except for the BOOT0 Pin which uses 56k. What am I missing?
2019-11-15 02:38 AM
>> 1) There's no way to not update the ST-Link software.
Ok I didn't know about that.
>> 2) Interface settings are set to SWD, not JTAG, since I read somewhere that JTAG is not supported by the ST-Link V2.
As far as I know that is not true.
I'm surprised that there is no capacitors on PF0-PF1 for the crystal.
2019-11-15 04:54 AM
Thanks for your reply. In the reply I posted to Danish this morning, I mentioned that there's a capacitor integrated in the crystal. Does this suffice or are additional capacitors on PF0 and PF1 mandatory?
2019-11-18 02:31 AM
I had a theory that the 820 Ohm resistors used for SWDIO and SCLK limited the current too much. I shorted both resistors with a piece of copper wire and I was able to upload my first code.
So the first time I was able to upload code I had the following configuration:
This raises another question:
The reason I chose 820 Ohm resistors was to limit the current going through the MCU in order to reduce the temperature. In the datasheet it says that the peripheral that consumes the most current is TIM2 at 49.1 uA/MHz. At 72 MHZ that results in a current of 3.535 mA. I chose to go with 820 Ohm, because 3.3V / 820 = 4.024 mA, a little above the required current, but considering I have 31 peripheral pins, 31 * 4.024 = 124.744 mA, which is still below the maximum source/sinking current of 150 mA. Did I miss something? Did I use the wrong values per pin?