|Sample Code of IVB Changing
|Page 1 of 1|
|Author:||HuJin [ Sat Oct 11, 2014 7:07 pm ]|
|Post subject:||Sample Code of IVB Changing|
User may want to change IVBASE when the system has booted up and enter into normal stage. Here is an example demo (built on demo-int) to show how to do it. As:
Step1: Add new vector table in crt0.S.
pic1.png [ 16.22 KiB | Viewed 5644 times ]
Step2: Implement new ISR in interrupt.c
pic2.png [ 21.15 KiB | Viewed 5644 times ]
Step3: Place the new vector table to the new IVBBASE,create a user section and fix the address in sag file.
pic3.png [ 13.53 KiB | Viewed 5644 times ]
Step4: Modify the system header file to enable new vector table and new ISR.( In this demo, we only modify N968A 4GB IVIC related code).
Step5：Change IVBASE (ir3) in main function.
pic4.png [ 13.51 KiB | Viewed 5644 times ]
Now we can run this demo on simulator or EVB, the result shows when timer1 interrupt occurs, it will go to new timer1's ISR.
The demo code is attached.
demo-int-new-ivbase.tar [220 KiB]
Downloaded 424 times
|Page 1 of 1||All times are UTC + 8 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group