This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

uint32 got copied wrong? (Bit error while debugging)

Hi,

I am struggling with I2S. While I was debugging my I2S data handler function, I found something interesting. I copy one element from a uint32 buffer into a (static volatile) uint32 variable and the values are not the same! Here is a screenshot:

image description

And here is the relevant disassembly:

image description

Can anyone explain?

Thanks,

NewtoM

  • what is p_data_received[sample] pointing to? is it connected to EasyDMA? First I though that this has to do something with the Thumb bit for ARM core but there is no branch instruction to that address, so its not about the thumb bit. Are your optimization level set to 0?

  • Hi Aryian, thanks for the reply. Optimization level is 0. But you are right, p_data_received is a pointer I get upon EasyDMA transfer finished. So yes, it is connected to EasyDMA, but EasyDMA should not write anything new into it at that point. It probably still does when debugging??? That could be a possible explanation.

  • EasyDma is not stopped when the debugger halts the CPU, so it is possible new transaction of EasyDMA overwrite your buffer.

  • Thank you! That must be the issue. I will keep that in mind while debugging.