Hello,
Someone please help,
I have not been able to program or debug the STM32F103T4. I can correctly detect the part with the "Cortex-M Target driver setup" but when I go to connect for programming, I get the following error : "Cannot Access Memory", but only the first time , every time after that, I get "Cannot enter debug mode". If I cycle the power on my board, the above error sequence repeats itself.
I have checked and rechecked the setting for flash and memory locations and they are correct per the data sheets.
My board has multiple of these chips, and they all do the same thing. Also The debugger works fine with the development PCB.
"My board has multiple of these chips, and they all do the same thing"
How are they connected? If you are trying to chain them together, you have to use JTAG as Serial Wire does not support chaining.
no they are not chained, they are completely separate entities and it does not work in either jtag or serial wire mode.
Another note: PA0/wkup does not function as defined in the documentation, it is supposed to be wake-up on rising edge only, but actually acts like a power up/down pin. It MUST be pulled up or it will not be seen on jtag at all, at any time,if I pull it low , it disappears, if I release the ground , it re-appears.
ALSO it does not appear to work with built in serial programming mode, when boot0=1 and boot1=0 the pins still float and nothing responds. I plan on using internal clocks only, but I also tried connection a crystal to it, but it does not oscillate.
the ulink is fine since it works with the development board.
Hello !
I have the same problem and please send me the note how did you manage this problem.
Thank you !
Few days ago I was tested SWD connection using only 2 wires without nTRST pin then things like this with cannot access memory and random errors happen but MCU is detected in debugger settings. So I think the problem is in nTRST pin connection.
WBR
You may want to reference a prior post I did: http://www.keil.com/forum/docs/thread13626.asp Hopefully that will be of *some* help.
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
nTRST is not used with SWD connection.
You should tryout different debugger Connect & Reset Options in the Debugger Setup dialog.
Connect: Normal or under Reset Reset: Autodetect or HW RESET or SYSTEMRESETREQ
Hello!
I solved the problem which was mine fault. The problem vas with signal nJTRST which I connect to ULINK RESET. But nJTRST is not sistem reset but JTAG reset so ULINK couldn't reset the CORTEX Problem can be solved width SYSRESETREQ option in "Target driver setup" This is software sistem reset thrue JTAG command.
Actually my problem was caused by my mistake on my pcb schematic.
Analog VDD was not connected to anything. this left the internal oscillator not functioning, which resulted in the strange behaviour I was having.
@Robert Rostohar
Yes you have right I was wrong because in my test I try to inject debug into running mcu.
seems nTRST is need only in hot plug connection.
CortexM3 TRM:
DWJ-DP reset nTRST reset initializes the state of the SWJ-DP controller. nTRST reset is typically used by the RealView? ICE module for hot-plug connection of a debugger to a system. nTRST enables initialization of the SWJ-DP controller without affecting the normal operation of the processor.