Hello everybody! If someone could please help with such problem. I am a pianist, so I know very little about programming in general, but at the moment I program an MSP432 Texas Instruments launchpad and use uVision for that purpose. What I am asking is if there is a way in C, to ask the processor to do nothing for exactly one clock cycle? If not, what is the way to do the shortest pause possible in C? If I use an empty "if" statement, it will be considerably longer than one cycle: reading from memory to one register, loading a comparing value into another register, comparing. Too long. Passing exactly one cycle would be optimal, but if such isn't possible, what is the shortest possible "do nothing" in C?
Thank you!!
The Cortex-M3 reference manual lists all op-codes. What you are looking for is a no-operation opcode.
https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/cortex-m-resources
=>
https://developer.arm.com/ip-products/processors/cortex-m/cortex-m3?_ga=2.168564771.30730016.1586785060-714993074.1584002927
developer.arm.com/.../ed
42Bastian Schick said:What you are looking for is a no-operation
Indeed - aka "NOP"
http://www.keil.com/support/man/docs/armcc/armcc_chr1359124998347.htm
Oh, no. Now you spoiled it ;-)
Yay yay yay!!! Thanks!!!
Stanislav Ossovsky said: I am a pianist, so I know very little about programming in general
That is a non-sequitur !
Why? I don't know much on programming, it is true. Although I know quite a bit about piano performance, I grant myself that :) If I know much I wouldn't ask such a question.
A non sequitur is a conclusion or reply that doesn't follow logically from the previous statement.
https://www.merriam-webster.com/dictionary/non%20sequitur
"knowing very little about programming" is in no way a consequence of "being a pianist"
Sorry for an off-topic, but if you know a number of guys, who practice piano 10 hours a day, you will agree with me. We even have a term between us: "a victim of an art school" :) But I agree, I had to put the word "and" there, it would be clearer. I am a pianist AND I don't know much about programming.