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

Regarding CRP Protection

Hello,

Can we change CRP protection from code. Like this
const unsigned long crp __attribute__ ((at(0x2FC))) = 0x87654321;

I need code read protection in my project. But if I enable it then JTAG will be disabled. To make it work in need, I will provide Button on My touch HMI and on button press event, I will change CRP protection to NO_CRP so I can use JTAG.

After burning new software, CRP will be reset to CRP2.

Pradeep P.

Parents
  • The CRP for your processor (that I have to guess model off because you decided it wasn't important to specify) is nothing magic.

    It is 4 bytes in the flash, that are read by the boot loader which then decides how to initialize the processor - or decides what the ISP are allowed to do. Obviously, you can't just assign a new value to the CRP variable since it is stored in flash. IAP can do things that isn't allowed by JTAG or ISP. But the question is why you should bother.

    As developer: program a unit without CRP enabled. There. That was simple.

Reply
  • The CRP for your processor (that I have to guess model off because you decided it wasn't important to specify) is nothing magic.

    It is 4 bytes in the flash, that are read by the boot loader which then decides how to initialize the processor - or decides what the ISP are allowed to do. Obviously, you can't just assign a new value to the CRP variable since it is stored in flash. IAP can do things that isn't allowed by JTAG or ISP. But the question is why you should bother.

    As developer: program a unit without CRP enabled. There. That was simple.

Children