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

Can't debug a project

Hello

I’ve been using my STM32L053 DISCOVERY board for a few months. It worked until yesterday. I wrote a program to write a 4 char array to eeprom, under my lecturers supervision, and suddenly my and four of my student mates boards “crashed“ during debugging session. I am using KeilV5.28.0.0 version, toolchain is MDK-ARM Cortex-M0/M0+ 256K.

Those are the errors that we are getting:
E310  : Debug access failed - cannot read address 0xF0000FE4 (accsize ‘4’, AP ‘0’)
Error: Flash download failed - Target DLL has been cancelled

We tried reinstalling the drivers and restarting our computers. We also tried reflashing firmware with STM32CubePrg, changed debug connecting settings in project options - neither of the above works to solve our problem.

Anyone has any ideas how to solve this?

Adding a picture of the errors I am getting:

Parents Reply Children
  • Do you really mean the EEPROM (2K - for data storage) or the Flash (program storage)?

    Either way, this suggests that there was something in your code that "blocks" the debugger; eg, disabling the pins used for the debug connection.

    Or, perhaps, you had "accidentally" set some protection bits ?

  • Yes, I do really mean the EEPROM, I used flash to name it in my previous message because flash is a type of EEPROM, if I am not mistaken

    And yes, something must have been in my code as it works now up to a point. Anyway, thank you!

    And if talking about protection bits, I haven't learnt about those so I can't comment on that

  • flash is a type of EEPROM, if I am not mistaken

    That is true: EEPROM = Electrically-Eraseable, Programmable, Read-Only Memory

    However, the term "EEPROM" is often used to mean specifically the type of EEPROM designed for data storage - as opposed to the "Flash" used for program storage.

    ST make this distinction in their datasheets:

    EDIT

    I suspect the reason for this is historical - "EEPROM" for non-volatile data storage probably predates the (common) use of Flash for program storage.

    IIRC, we had "EEPROM" for non-volatile data storage in the days of UV-EPROMs for code storage ?

  • Yes, I'm going to grind on my knowledge of certain definitions regarding memory and other things that go into microprocessors as a whole package

    You are probably right

  • It's idiomatic, rather than strict, literal meaning of the words.

    Like "RAM" is always taken to mean "volatile, read/write memory" - even though Flash also has random access!

  • good information, it helps me.