I am converting a project built on an STM32F072 to an STM32L071. I use a small area of flash memory to store some tables, etc. < 100 bytes. The program using the STM32IDE works fine for the F072, but I get a Hard fault with the L071.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-29 1:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-29 1:21 PM
Not really much detail to bite on there.
Does the L0 have width and alignment expectations?
Have a Hard Fault Handler that outputs some actionable data, look at the code faulting, look at the registers, and the address that's causing the issue.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-29 11:45 PM
Maybe you use flash as eeprom code in F072, but addressing and size for L071 is other. Too L071 have internal EEPROM then better is use it instead flash writes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-30 2:48 AM
Lots of info on debugging Hard Faults:
#HardFault​
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-30 1:48 PM
Thanks to MM..1, I used Data eeprom and it worked perfectly, Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-30 3:00 PM
While on STM32F, erased flash is 0xff. it is 0 on STM32L0. That could be a pitfall too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-31 3:01 AM
A complex system designed from scratch never works and cannot be patched up to make it work.
