2021-09-02 04:25 AM
Greetings,
I have a board with STM32L151RET6. I can program the controller using st-link, but as soon as i try to enter debug mode it ide says cannot read memory. I am using keil and i am trying to enter debug modue using keil debugger and stlink.
I have also connected 10k ohm to boot0 and gnd. Still keil cannot enter debugger. It says error *** error 122: AGDI: memory read failed (0xFFFFFFFE)
Please help me with the error.
Controller can be programmed using st link as well as keil.
2021-09-02 04:37 AM
Make sure NRST is connected, and select "Connect Under Reset" in options.
Make sure not to reconfigure to debug pins, or go into low power modes.
2021-09-02 04:42 AM
NRST is connected to GND using 0.1uF capacitor and "Connect Under Reset" is selected. Are there any chances that controller is blown ?
2021-09-02 05:01 AM
Is NRST connected to the ST-LINK?
2021-09-02 05:29 AM
nopes. I never connect nrst to st link. Let me be clear that this controller was bought from china. I have already made one board with original ic bought from st website and it is working perfectly fine.
2021-09-02 08:56 PM
Hi,
I have connected 0.1uF capacitor to NRST and other end at ground. Still the problem remains. I tried debugging in stm32 cube ide and getting below error
Break at address "0xfffffffe" with no debug information available, or outside of program code.
fffffffe: Failed to execute MI command: -data-disassemble -s 4294967294 -e 4294967393 -- 3 Error message from debugger back end: Cannot access memory at ddress 0xfffffffe
Any idea what is going on ?
2021-09-02 09:52 PM
Can you connect to and inspect the part using STM32 Cube Programmer or the ST-LINK Utilities?
2021-09-02 11:04 PM
Greetings Tesla,
Problem found. It was in options byte - nBFB2 was un-checked. I checked it and it started running from internal memory. After lots of reading suddenly my attention was drawn to that bit / flag.
Now controller is running as it should.
Thanks for help.