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

Fault interrupt of 30F5015

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



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

Fault interrupt of 30F5015
PostPosted: Tue Jul 09, 2013 1:22 pm     Reply with quote

Greetings! I'm using MPlab v 8.91, ccs v4.134 and dsPIC30F5015. I have a problem with the fault interrupt. In normal conditions this interrupt makes 2 things - in sets the pwm outputs to the condition set into set_motor_unit() and it jumps to #INT_FAULT interrupt function. I want to use only the interrupt function without setting the outputs. I tried to compile the program without FAULT setting in set_motor_unit(), but in this case the #INT_FAUL doesn't trigger. I had enable_interrupt(INTR_GLOBAL) and INT_FAULTA but it seems there is something else I have set.
Can you tell me how to achieve this goal?
Thanks!
Ttelmah



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Wed Jul 10, 2013 1:01 am     Reply with quote

All you should have to do, is compile with the option in set_motor_unit, 'MPWM_FAULT_NO_CHANGE'. This says to trigger the interrupt, but don't change the PWM pins.

Best Wishes
stoyanoff



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

PostPosted: Wed Jul 10, 2013 9:22 am     Reply with quote

Thanks!
notbad



Joined: 10 Jan 2013
Posts: 68

View user's profile Send private message

PostPosted: Wed Jul 10, 2013 1:03 pm     Reply with quote

I have a question about PWM fault input in 18F26K22 .
The datasheet is a little vague.
What are the options for using fault input and external interrupt in this chip?
Thanks
Javad
Ttelmah



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Thu Jul 11, 2013 3:39 am     Reply with quote

The K22, does not have a fault input like this. What it has is 'auto shutdown', where the hardware can be configured to automatically go to a 'safe' state, when a signal goes over a threshold (using the comparator), or a signal is seen on the INT0 pin. This in itself does not trigger an interrupt, but the same event that is used to trigger it (so comparator, or INT0), can itself trigger an interrupt.

Best Wishes
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