Write once for bootloader

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

cross mob
jofo_817731
Level 1
Level 1

Hi,

I have a PSOC5 system in production where no flash protection has been set. It has a bootloader and new firmware is released regularly that end users can install.

Now we are about to release a different product, with less features, only differentiated by firmware. I need to prevent users of the new system to read back the flash of the existing product and program into the new product using miniprog3 for example.

Is the best approach to make a different bootloader and set the "Write only" option on part of the flash containing the bootloader? Is there a step by step way of doing this?

Thanks!

0 Likes
7 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Hello,

Please have a look at the https://www.cypress.com/documentation/application-notes/an73854-psoc-3-psoc-4-and-psoc-5lp-introduct...

Section:5.6.2 Flash Protection and Section: 6.7 Flash Protection

Thanks,

Hima

0 Likes

Thanks. I am trying to set the Write Once Latch, but it does not seem to have any effect.

I use the PSoC Programmer and a Miniprog3, and I enable the "Chip lock" option. But after I program the device and reset it with this option enabled, I can still reprogram again.

Is the issue that the .hex file does not contain the right values in the NVL registers? I have not been able to figure out how to write to the NVL regs!

Thanks,

Jostein

0 Likes

Hello Jostein,

Are you setting the NVL in the Bootloader project?

Thanks,

Hima

0 Likes

That's what I think i should do, but I don't know how.

On Fri, Feb 1, 2019 at 7:58 AM HimaM_31 <community-manager@cypress.com>

0 Likes

Hi,

I have really been trying now... thanks if you can help me!

I see this in the datasheet:

The WOL only locks the part after the correct 32-bit key (0x50536F43) is loaded into the NVL's volatile memory, programmed into the NVL's nonvolatile cells, and the part is reset. The output of the WOL is only sampled on reset and used to disable the access. This precaution prevents anyone from reading, erasing, or altering the contents of the internal memory. The user can write the key into the WOL to lock out external access only if no flash protection is set (see “Flash Security” section on page 17). However, after setting the values in the WOL, a user still has access to the part until it is reset. Therefore, a user can write the key into the WOL, program the flash protection data, and then reset the part to lock it

So pretty simple, I just need to write 0x50536F43 to the WOL register. How do I do that?

I would have thought this is precisely what the Chip lock option in the PSoC Programmer does!?

0 Likes

Hello Jostein.

I don't have a MiniProg3, so I can't offer any help with it's commands.

If you look at PSoC 5 Architecture TRM, search for "wol", you might find what you're looking for.

https://www.cypress.com/documentation/technical-reference-manuals/psoc-5lp-architecture-trm?source=s... 

See Chapter 41, Nonvolatile Memory Programming.

Bill

0 Likes

Hello,

1)Can you check if the hex file is programmed successfully. That means, after programming are you getting the expected output of the new firmware?

2)After reprogramming also are you able to get expected output from the new project?

Thanks,

Hima

0 Likes