Andes Workshop
http://forum.andestech.com/

Sample Code of IVB Changing
http://forum.andestech.com/viewtopic.php?f=16&t=894
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.
Attachment:
pic1.png
pic1.png [ 16.22 KiB | Viewed 5905 times ]


Step2: Implement new ISR in interrupt.c
Attachment:
pic2.png
pic2.png [ 21.15 KiB | Viewed 5905 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
pic3.png [ 13.53 KiB | Viewed 5905 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
pic4.png [ 13.51 KiB | Viewed 5905 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
pic5.png [ 20.7 KiB | Viewed 5905 times ]


The demo code is attached.
Attachment:
demo-int-new-ivbase.tar [220 KiB]
Downloaded 444 times

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/