2020-12-19 06:51 PM
Everything I'm seeing seems like it should be straightforward. But I have been through everything Google came up with and have tried as many pull up resistor values, configurations, and sequences as I could find and had no luck. Have tried STVD Light Programmer as well as STVP. ST Link V2 connection seems like it is right. (1 - VDD, 2- SWIM, 3- GND, 4 - NRST)
MCU schematic is as follows:
VDD(5V) -> 1uF to GND
SWIM-> Same results with both:
1. Connected right to ST Link or
2. Added ~750ohm pull up to VDD.
NRST-> 0.1uF to GND. I am seeing different errors based on NRST configuration when trying to program through STVD light programmer.
Error 1:
<NRST just going to ST Link OR NRST pulled up to VDD regardless of Pull Up value>
Error: Problem while trying to Reset swim and device. Apply a Power On Reset.
Blue = SWIM
Yellow = NRST
Error 2:
<NRST pulled to GND>
Error: Cannot communicate with the device !
Check the SWIM cable connection and check all the needed pin connections on the SWIM connector.
If the application code uses Swim Disable and Reset pin as Output or has disabled SWIM Clock Divider: Try Now to SWITCH OFF and ON the application Power Supply while NRST Reset pin is forced low.
If I follow the recommendation above, I just keep getting the same error.
I have not configured the pins as outputs. I have tried CLK_SWIMConfig(CLK_SWIMDIVIDER_2); and that did not seem to make a difference in results.
NRST pulled low: Blue = SWIM, Yellow = NRST
After I release the NRST pin and try again, the ~4.5KHz oscillation stops on the NRST pin, but still get Error 1 again.
My code is essentially the STM8S Std Periph templates set up for the STM8S208 and in the main.c I am just fading in and out an LED using PC3/TIM1_CH3.
The code works on the STM8S-Discovery board (Using the appropriate GPIO) programming via the on board ST Link.
Does anyone have any recommendations on where to go from here, or see any mistakes off of the information I have provided? If there is any additional information that would be helpful in determining the issue please let me know.
Thank you.