Skip to main content
chai
Associate II
August 27, 2012
Question

Assign Value on STM32

  • August 27, 2012
  • 2 replies
  • 692 views
Posted on August 27, 2012 at 22:25

Hi,

I used

uint8_t CSD_Tab[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

to initialize an array. But when I use IAR EWARM to watch the content in this array, the value is always unchanged. Any ideas?

Thank you
    This topic has been closed for replies.

    2 replies

    chai
    chaiAuthor
    Associate II
    August 27, 2012
    Posted on August 27, 2012 at 22:43

    OK, I just figure it out. I did not allocate the RAM memory for it.

    frankmeyer9
    Associate III
    August 28, 2012
    Posted on August 28, 2012 at 09:26

    Not quite true.

    With  ''uint8_t CSD_Tab[16] '' you did actually allocate that array.

    Perhaps you never changed it's contents, or the IAR compiler optimized it out.

    Trying to learn both C and microcontrollers at the same time could become difficult and frustrating ...