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

Fast isr routine with PCD compiler

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



Joined: 08 Jan 2010
Posts: 8

View user's profile Send private message

Fast isr routine with PCD compiler
PostPosted: Fri Jan 08, 2010 6:59 am     Reply with quote

I have to write an extreme fast interrupt routine for dsPIC30 Chip using pcd compiler.

No registers are changed and the top int level in this project is used.

The keyword fast can then be used for the next lower int level.

I tried the following code:
Code:

#bit INT1EP = 0x82.1
#bit NSTDIS =0x80.15
#bit INT1IF = 0x86.0
#word IPC4 =0x9C


#rom 0x34 =  {0x000100}// Int Vector INT1

#org 0x100, 0x110
Void Ext1_isrTest(void){
    output_high(_Freig_V);
    VKurzschluss =1;
    output_high(LED_G2);//Test
    INT1IF =0;
    #ASM
      RETFIE
    #ENDASM
   
}
initial routine:

   INT1EP =1; //Hi to Lo flanke
   bit_set(IPC4,0); //priority level 5
   enable_interrupts(INT_EXT1 );

   enable_interrupts(INT_ADC1); //Default priority level 4
   
   NSTDIS =0; //Interrupt nesting is enabled

The compiler will generate an error, because writing to rom location below 0x100 is not allowed.
How can I place an pointer address to ram location 0x34?
Or is there an other possibility to write own isr routine?
Wayne_



Joined: 10 Oct 2007
Posts: 681

View user's profile Send private message

Re: Fast isr routine with PCD compiler
PostPosted: Fri Jan 08, 2010 8:17 am     Reply with quote

Regas wrote:

I tried the following code:


No you didn't, because that will not compile, I know it will not compile and I have not even tried to compile it.

Post something that does compile which includes CCS version numbers and FUSE settings.

Remove :-
Code:

#rom 0x34 = {0x000100}// Int Vector INT1


Change
Code:

#org 0x100, 0x110
Void Ext1_isrTest(void){


Try
Code:

#INT_EXT1 FAST
void Ext1_isrTest(void){
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Fri Jan 08, 2010 9:26 am     Reply with quote

In a short, PCD is missing all means, also at the assembler level, to do what you are trying to achieve, e.g. assign
interrupt vectors to arbitrary functions. Some special solutions, also related to bootloader programming are
effectively blocked this way.

But #INT_XXX FAST works and should be sufficient for the intended purpose.
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