Hi Jake,
from your code __NOP can be used for delay. can you please test to step over the __NOP, can it work normal?
if you increase the value of delay_cnt, can you see the time cost for delay_us() increased with scope?
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------