<Krazubu>
as far as I understand I have to use "dap" command
<PaulFertser>
Krazubu: hi
<PaulFertser>
Krazubu: what flash driver are you using for your target? Usually this functionality is part of the driver.
<Krazubu>
well it's not in the official branch, it's a mod of efm32.c to support EFR32 series 2
<PaulFertser>
Krazubu: so read that driver sources
<PaulFertser>
Krazubu: map what you see to what's written in the document you mentioned.
<PaulFertser>
Krazubu: it's just C code
nerozero has quit [Ping timeout: 240 seconds]
<PaulFertser>
Krazubu: it looks like need AN0062 for more details.
<PaulFertser>
Krazubu: btw, why page-by-page erase doesn't work for you?
<Krazubu>
I can erase the main flash
<Krazubu>
but there's a "user_data" bank that is locked
<Krazubu>
and it seems that device erase is the only way to unlock it
<PaulFertser>
Krazubu: in your document they say they'll be talking about user data as "information block" and never mention it again :)
<Krazubu>
:)
<Krazubu>
well U have many different PDFs I've seen one talking about it
<Krazubu>
I*
<PaulFertser>
Krazubu: the flash driver does write to that register, so you can extend it to add that mass erase bit too.
<Krazubu>
I have no idea how to do that
<Krazubu>
which register are you talking about ?
<PaulFertser>
Krazubu: just read the sources, it's in src/flash/nor/
<PaulFertser>
In proper upstream efm32 driver it's called EFM32_MSC_REG_WRITECMD
<Krazubu>
yeah I'm on it but I only have basic c skills, and moreover I think I lack technical background to understand how this generally work
<PaulFertser>
No magic there, basic C understanding should be enough.
<PaulFertser>
Krazubu: are you not developing MCU software?
<Krazubu>
well if blink a led is developping, I do :)
<Krazubu>
I'm just curious and trying to learn
<PaulFertser>
You found yourself quite a hard way to learn then ;)
<karlp>
start by making sure you're comfortable with the basic flashing and debuggin options, the per page menu items and particularl user flash sections and options are always wonky corners.
<PaulFertser>
But sometimes it's really the best way if you have time.
<karlp>
if the basics don't work, it's unlikely to be even worth trying the corners.
<Krazubu>
hehe sure, well I know to do basic stuff with arduino and things like that, but when it goes lowlevel like this I don't know much about it
<karlp>
those are unlikely to be for series 2 devices, but who knows, no dates on their blogging...
<karlp>
that sort of manual stepping aroudn writing to memory is functional, but normally wrapped up by the driver.
<karlp>
if those are required, teh driver is incomplete/broken.
<Krazubu>
karlp it's definitely not for series 2 but I thought the principle could still apply, with the correct addresses etc…
<karlp>
sure...
<Krazubu>
but I don't understand the way it works, for instance it requires a "dap numer", I don't know where I get that from, and I also don't understand how I know the address to write to all this is probably in the docs but…
<karlp>
just don't try blindly pasting shit back and forth :)
<Krazubu>
yeah I guess that could brick it or trigger weird things
<Krazubu>
thankfully it seems device erase command is the solution to everything… if I know how to trigger it :)
<PaulFertser>
Krazubu: do you already have the flash driver working?
<PaulFertser>
Krazubu: if yes, mod /that/ as it knows the right ap number etc.
<Krazubu>
yeah it works at least well enough for basic stuff, I'm far from having tested all, but I still had to mod it a bit so it supports seeing bitlocks and user data banks
<PaulFertser>
Krazubu: so mod it a bit more to do mass erase once.
<Krazubu>
I can't do that, my mod so far was just applying what somebody posted in a forum
<PaulFertser>
Krazubu: I suggest you find some book about C programming language that you can like. I personally prefer K&R.
<Krazubu>
actually I don't think the problem is with c code at the moment
<Krazubu>
it's just I don't understand how it works
<PaulFertser>
Someone wrote that code reading the silabs docs, so you should see how it all fits together by reading both.
<Krazubu>
I guess if I did I could use dap command, then maybe code something