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.
Attachment:
pic1.png [ 16.22 KiB | Viewed 13255 times ]
Step2: Implement new ISR in interrupt.c
Attachment:
pic2.png [ 21.15 KiB | Viewed 13255 times ]
Step3: Place the new vector table to the new IVBBASE,create a user section and fix the address in sag file.
Attachment:
pic3.png [ 13.53 KiB | Viewed 13255 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.
Attachment:
pic4.png [ 13.51 KiB | Viewed 13255 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.
Attachment:
pic5.png [ 20.7 KiB | Viewed 13255 times ]
The demo code is attached.
Attachment:
demo-int-new-ivbase.tar [220 KiB]
Downloaded 1163 times