How to erase and write BMHDx in run time

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User19642
Level 1
Level 1
First like received Welcome!
Hi,

I am working on a boot updater software (for reprogramming bootloader). I am planning to use 2 BMHDs .BMHD0 for bootloader and BMHD1 for boot updater.
I attached an image file about my design. I am planning to erase BMHD0 before erasing bootloader so that in case a reset happens ( ex :due to power failure) during this then execution should jump to boot updater.
Now could u please tell me how to erase and write BMHDx during run time. Is there any libraries are available for that. I could find only BMHDx structure form ILLD (Ifx_Cfg_SswBmhd.c). Couldn't find any APIs for that.
Please help me.

4333.attach


Thanks
Jithin K Joy
0 Likes
6 Replies
Andrew_Q
Level 1
Level 1
5 replies posted 5 sign-ins First like received
You will have to erase the sector where BMHD is located
0 Likes
Darren_Galpin
Employee
Employee
First solution authored First like received
You will need to do an erase sector/load data/program page sequence using the BMHD UCB base address. The UCBs are treated as Data Flash 0 areas for the purposes of programming.
0 Likes
User19642
Level 1
Level 1
First like received Welcome!
Thank you Andrew_Q & Darren Galpin answering .

I am using some flash drivers in my software which I use to erase and write in to pflash. Can I use the same for Dflash/UCB?
0 Likes
Darren_Galpin
Employee
Employee
First solution authored First like received
Probably, although the amount of data you can load/program for a page differs between pflash and dflash, so you may need to take that into account,
0 Likes
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored
Just a caution, in the datasheet the UCB Retention Time requires that you follow these limits:

Max. 100 erase/program cycles per UCB, max 500 erase/program cycles for all UCBs together

Does your design consider this?
0 Likes
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
Are we talking TC2xx here, or TC3xx? From your initial diagram, it looks like you only need to worry about programming PFLASH. Updating UCBs is best avoided.
0 Likes