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

SPI interrupt doesn't work after breakpoint

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



Joined: 21 Dec 2005
Posts: 25

View user's profile Send private message

SPI interrupt doesn't work after breakpoint
PostPosted: Mon Nov 12, 2012 11:45 am     Reply with quote

I am utilizing a PIC24FV32KA304 devices and PCWHD 4.134 on Win 7. I have recently added an SPI slave peripheral to my source and running the transactions for this peripheral off of interrupts driven by the master. If I start my application and let it run, the SPI interrupts work flawlessly. If I ever halt the code, or hit a breakpoint, after this event the SPI interrupt never fires again. It doesn't matter if the breakpoint is in the mainline of the source or the interrupt. I can't seem to be able to figure out what I have done to disable this interrupt. Any ideas? It is significantly impeding my ability to debug my source code.
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Nov 12, 2012 12:08 pm     Reply with quote

Several, but without seeing your source code, there is no way to decide what is wrong !
You should submit a small, compilable program that gives the 'error' so others can try it and decide where the problem is.
Get rid of everything that is NOT needed to show the problem.
hth
jay
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Nov 13, 2012 5:33 am     Reply with quote

It sounds a bit like you have problems with SPI receive buffer overflow during the breakpoint, but I can't find this quick how that affects the hardware SPI. For example the UART will block on receive buffer overflow but I can't find a description for the SPI buffer in this situation.

The PIC24FV32KA304 has many more SPI options than the PIC18 series. For example there are 8 different settings for when a SPI interrupt should be generated. Also, are you using the 'Standard buffer mode' with one buffer, or the 'Enhanced Buffer Mode' with 8 FIFO buffers?
Without any more info on how your SPI is configured it is impossible to say where your code is at error.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Nov 13, 2012 9:55 am     Reply with quote

I also expect an overflow condition. You can see it in the SPI status.
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