Author Topic: LPC2103 code read protection  (Read 6964 times)

bfang

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
LPC2103 code read protection
« on: October 17, 2006, 07:17:33 pm »
Would you please help me out with this issue ASAP?
After selecting "set code read prot" while programming LPC2103, the result turns to be different. The output of P12 shows waveform distortion after filtering. I wonder setting this option has anything to do with the function of program except read protection. If I didn't select this option, the waveform would have no distortion.

Would you please tell me there is any connection between the code read protection option and the software functions?

Looking forward to any quick reply! Urgent!

Any info will be appreciated!

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2165
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC2103 code read protection
« Reply #1 on: October 17, 2006, 07:21:40 pm »
Code Read Protection on the LPC2xxx is implemented by storing a specific value at a specific memory location. If your firmware also uses those locations then it will be corrupted.

See the user manual for the LPC2xxx for more details.

Embedded Systems Academy, Inc.
support at esacademy dot com

bfang

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: LPC2103 code read protection
« Reply #2 on: October 17, 2006, 08:09:25 pm »
Thanks for your quick reply Andy!

Is there any other possible reason for this? Because it is not corrupted obviously and other functions are working properly.

Another question is for the checksum byte (0x0000014). Flash Magic  must have programmed it with the 2

bfang

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: LPC2103 code read protection
« Reply #3 on: October 17, 2006, 08:34:03 pm »
Any update?

Bin

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2165
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC2103 code read protection
« Reply #4 on: October 18, 2006, 08:07:10 am »
I'm not sure of another cause for code read protection to alter the execution of your firmware.

Flash Magic does program the checksum bytes starting at location 00000014H, otherwise it would be a bit of a pain to get your code to execute.

Also note that if code read protection is enabled, verify will still work. The verify skips the code read protection locations if all four locations match the code read protection value.

Embedded Systems Academy, Inc.
support at esacademy dot com

bfang

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Re: LPC2103 code read protection
« Reply #5 on: October 18, 2006, 08:16:16 am »
Great response Andy!

Yes, we are tracing the overlap on code read protection location. And, I don't need to worry about the checksum bytes now.

In addition, the updated Flash Magic is way faster than before when verifying the written code. Thanks for your great work!

Bin