Run time read & calculate checksum on section of FLASH?

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

cross mob
Anonymous
Not applicable

I need to calculate the checksum for sections of FLASH memory that contain the program.

   

How can I read FLASH?

   

Thanks,

   

Paul.

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Use pointer arithmetic, as

   

uint8 * Mypointer;

   

Assign your starting address to it and read from as

   

Sum += *(Mypointer++);

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Easier than I expected 🙂

   

Thanks, Paul.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

This covers the organization of memory, and name of pointers to it -

   

 

   

http://www.cypress.com/documentation/application-notes/an89610-psoc-4-and-psoc-5lp-arm-cortex-code-o...     AN89610 - PSoC® 4 and PSoC 5LP ARM Cortex Code Optimization

   

 

   

cydevice.h contains key base addresses. Auto generated, in workspace explorer.

   

 

   

Regards, Dana.

0 Likes