Skip to main content
Explorer
July 26, 2023
Question

declaring variables with ram address

  • July 26, 2023
  • 1 reply
  • 796 views

I declared some test variable like,

unsigned short *testvar= (unsigned short *)0x20020074;

unsigned char *testvar1[4] = {(unsigned char *)0x20020076,(unsigned char *)0x20020077,
                                                  (unsigned char *)0x20020078,(unsigned char*)0x20020079};

but unfortunately in mid I left some part of the ram space and again declared a variable like,

unsigned short *testvar2= (unsigned short *)0x20020092; 

I'm computing checksum from 0x20020074 to 0x20020092 and storing into flash , but  0x20020080 to 0x20020091 nowhere i'm declaring this space .is it create problem when i'm retrieving data from flash into ram?

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    July 26, 2023

    Hello @madhavi U ,

     

    Do you mean retrieving data from RAM to Flash?  you may need to check this post Solved: Declaring variables in SRAM1-3 areas of H7 devices... - STMicroelectronics Community

    Hope this helps!