一个简单的MC9S12XEP100MAL 定时器中断程序,在BDM仿真调试时,程序运行有中断,但拿开BDM后,程序运行就没有进入中断了,是什么原因?
Original Attachment has been moved to: demoXEP100timer.rar
Hi,
in your code you write the timer counter (TCNT) register which is writable in special modes. So, in Normal mode (without BDM connection) this register is not writable and so it does not work.
We have many SW examples demonstrating timer functionality. See following documents:
LAMA's S12XE unofficial examples
Look for ECT and TIM keywords.
Have a great day,
iggi
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------