CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC24 IVT Remap [solved]

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ck



Joined: 02 May 2012
Posts: 18

View user's profile Send private message

PIC24 IVT Remap [solved]
PostPosted: Wed May 09, 2012 1:42 am     Reply with quote

Hi guys,
i have done a CAN-Bus bootloader for PIC24 and it works good without interrupts.
I have some problem on IVT remapping.

I have a Timer1 interrupt placed at 0x00001A Pic's location by default.

In my bootloader i wrote:
Code:

#build(reset=0x000000, interrupt=0x000200)

and
Code:

#ORG 0x1A, 0x1D
void TIMER1_REMAP(void)
{
    #asm
    goto 0x003030
    #endasm
}


This means that when Timer1 interrupt occurs, it has to jump to location 0x03030


In my user_program i put #int_timer1 at 0x003030:
Code:

#build (reset=0x003000, interrupt=0x003004)
#org 0, 0x002FFE {}


Look at Bootloader-program-memory i see:

Location Asm Code
0x00001A goto 0x003030

In user_program:

Location Asm Code
0x003030 goto my_timer1_routine()

But doesn't work. Please can you help me?
Thanks in advance

P.S: PIC24HJ256GP610 ccs 4.104


Last edited by ck on Wed May 09, 2012 3:55 am; edited 2 times in total
ck



Joined: 02 May 2012
Posts: 18

View user's profile Send private message

PostPosted: Wed May 09, 2012 3:03 am     Reply with quote

Update:
I have try the TIMER1 interrupt in bootloader with same principe.

At location 0x001A i put goto 0x0022C
and in 0x0022C i put my #int_timer1 routine.

Still doen't work. In Simulation i see an Address error trap
ck



Joined: 02 May 2012
Posts: 18

View user's profile Send private message

PostPosted: Wed May 09, 2012 3:54 am     Reply with quote

I understand my error. Now it works.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group