This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM Cortex M0-DS and Keil Tools

I am trying to impliment a program which take data from GPIO port and send it on UART and LED port using cortex M0DS kit.
I worte a code in C and try to generate hex file to burn in flash. But the the conversion of c code to assmebly language is not proper. I attach a image of both its c and its assembly.But i found that it will not take any data from GPIO port in second while loop.Untitled.png

Parents
  • Hi there

    I think the issue is that you should declare 'data' (and data1) as volatile, which tells the compiler that they can be changed by something outside of the code flow. This will tell the compiler to re-read the values to see if data==data1 is true in the loop.

    Regards

    Ronan

Reply
  • Hi there

    I think the issue is that you should declare 'data' (and data1) as volatile, which tells the compiler that they can be changed by something outside of the code flow. This will tell the compiler to re-read the values to see if data==data1 is true in the loop.

    Regards

    Ronan

Children
No data