Andes Workshop

It is currently Fri Mar 29, 2024 1:20 am

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Sample Code of IVB Changing
PostPosted: Sat Oct 11, 2014 7:07 pm 
Offline

Joined: Fri May 04, 2012 6:49 am
Posts: 17
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 12575 times ]


Step2: Implement new ISR in interrupt.c
Attachment:
pic2.png
pic2.png [ 21.15 KiB | Viewed 12575 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 12575 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 12575 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 12575 times ]


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


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group