This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MCBSTM32 + ULINK2 Debug Problem

Hi!

First I have to say everything worked fine till now!

Now I get the error: "cannot access memory"

When debugging a sample project like "Blinky" I get the error when starting, but debugging seems to work fine.

When debugging my own project it depends on the CPU Speed (PLL Multiplier) if debugging works or not. But everytime I get the error "cannot access memory"!!

So my question is if the ulink2 or the mcbstm32 causes the problem?

best regards
Mathias

Parents
  • Try the following:

    - go to the Blinky example for MCBSTM32 in folder \Keil\ARM\Boards\Keil\MCBSTM32\Blinky and open the Blinky.Opt file with a text editor

    - remove lines with text "OPTMM 2,8,(0x10000000)" (should exist 3 times) and save the file

    - open the Blinky project in uVision and start the debug session and check if you still get the error message "Cannot access Memory"

Reply
  • Try the following:

    - go to the Blinky example for MCBSTM32 in folder \Keil\ARM\Boards\Keil\MCBSTM32\Blinky and open the Blinky.Opt file with a text editor

    - remove lines with text "OPTMM 2,8,(0x10000000)" (should exist 3 times) and save the file

    - open the Blinky project in uVision and start the debug session and check if you still get the error message "Cannot access Memory"

Children
  • Hi!

    @ Robert: OPTMM Lines didn't exist, I think this is a result of deactivating Memory Window 2?

    Today I got a second ulink2 but surprisingly I got the same error! So it was clear that there must be an error in the project settings!

    After checking I saw that memory window 1 was also initialised with 0x10000000! After deactivating or changing it to 0x8000000 it seemed to work because there were no Error messages left!

    But there was another problem, which I described above: The debugger failed when initialising the PLL with a multiplier of 9 to get 72MHz but worked with a multiplier of 3!

    I compared my project with Blinky and found out that in my project I didn't enable "Embedded Flash Configuration" in STM32_Init.c!

    After enabling everything works fine!

    But why do I have to enable this for a higher PLL multiplier?

    So the solutions for my problem is following:

    * disable memory windows or initialise them with correct values (0x8000000 instead of 0x10000000)

    * enable "Embedded Flash Configuration" in STM32_Init.c

    Thanks for your help!

    best regards
    Mathias