Jump to content
Sign in to follow this  
sdujolo

Interrupt_low And -swcs S3

Recommended Posts

Hello,

 

I how to get interrupt_low to work on a PIC18? I have addet the switch -swcs s3 but that will not link? I Got error.

 

Regards /Jörgen

 

Linking...

 

C:\Program\SourceBoost\boostlink.pic.exe /ld C:\Program\SourceBoost\lib libc.pic18.lib eeprom.obj MultiControl.obj oo.obj serial.obj adc.obj /t PIC18F4620 /d D:\Dev\Pic\MultiControlPic18 /p MultiControl -swcs s3

 

BoostLink Optimizing Linker Version 6.55

http://www.sourceboost.com

Copyright© 2004-2006 Pavel Baranov

Copyright© 2004-2006 David Hobday

 

 

 

 

Failure

Error: Failed to open:s3.

Done

Share this post


Link to post
Share on other sites

Jörgen,

Hello,

 

I how to get interrupt_low to work on a PIC18? I have addet the switch -swcs s3 but that will not link? I Got error.

 

Regards /Jörgen

 

Linking...

 

C:\Program\SourceBoost\boostlink.pic.exe /ld C:\Program\SourceBoost\lib libc.pic18.lib eeprom.obj MultiControl.obj oo.obj serial.obj adc.obj /t PIC18F4620 /d D:\Dev\Pic\MultiControlPic18 /p MultiControl -swcs s3

 

BoostLink Optimizing Linker Version 6.55

http://www.sourceboost.com

Copyright© 2004-2006 Pavel Baranov

Copyright© 2004-2006 David Hobday

 

 

 

 

Failure

Error: Failed to open:s3.

Done

You don't need to use the -swcs (SoftWare Call Stack) option to use the low priority interrupt. The low priority interrupt will just work.

 

-swcs is normally used to setup stack usage when using Novo RTOS.

If you did want to use it then the format is:

-swcs 20 4 2

This give hardware stack usage of 20 in the main task before using software callstack, hardware stack usage of 4 in high priority interrupt before using software callstack, hardware stack usage of 2 in low priority interrupt before using software callstack.

 

Regards

Dave

 

Regards

Dave

Share this post


Link to post
Share on other sites
Jörgen,
Hello,

 

I how to get interrupt_low to work on a PIC18? I have addet the switch -swcs s3 but that will not link? I Got error.

 

Regards /Jörgen

 

Linking...

 

C:\Program\SourceBoost\boostlink.pic.exe /ld C:\Program\SourceBoost\lib libc.pic18.lib eeprom.obj MultiControl.obj oo.obj serial.obj adc.obj /t PIC18F4620 /d D:\Dev\Pic\MultiControlPic18 /p MultiControl -swcs s3

 

BoostLink Optimizing Linker Version 6.55

http://www.sourceboost.com

Copyright© 2004-2006 Pavel Baranov

Copyright© 2004-2006 David Hobday

 

 

 

 

Failure

Error: Failed to open:s3.

Done

You don't need to use the -swcs (SoftWare Call Stack) option to use the low priority interrupt. The low priority interrupt will just work.

 

-swcs is normally used to setup stack usage when using Novo RTOS.

If you did want to use it then the format is:

-swcs 20 4 2

This give hardware stack usage of 20 in the main task before using software callstack, hardware stack usage of 4 in high priority interrupt before using software callstack, hardware stack usage of 2 in low priority interrupt before using software callstack.

 

Regards

Dave

 

Regards

Dave

 

Hello Dave,

 

I cut this code from the normal interrupt and paste it to the low intrrupt function and now is not working why? It is working when I have it in normal interrupt.

 

Regards /Jörgen

 

void interrupt_low( void )
{
//Handle timer0 interrupt
if( intcon & (1<<T0IF) )
{
	counter++;
	clear_bit( intcon, T0IF ); //clear timer 0 interrupt bit
}  
}

Share this post


Link to post
Share on other sites

Jörgen,

 

Hello Dave,

 

I cut this code from the normal interrupt and paste it to the low intrrupt function and now is not working why? It is working when I have it in normal interrupt.

 

Regards /Jörgen

Have you enabled interrupt priorities on the PIC18 (Set the IPEN bit)?

 

Regards

Dave

Share this post


Link to post
Share on other sites
Jörgen,

 

Hello Dave,

 

I cut this code from the normal interrupt and paste it to the low intrrupt function and now is not working why? It is working when I have it in normal interrupt.

 

Regards /Jörgen

Have you enabled interrupt priorities on the PIC18 (Set the IPEN bit)?

 

Regards

Dave

 

Thanks Dave,

 

I got it working now I had forget to clear TMR0IP.

 

BR /Jörgen

clear_bit(intcon2, TMR0IP);	//TMR0 Overflow Interrupt Priority bit 1 = High priority 0 = Low priority

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...