View previous topic :: View next topic |
Author |
Message |
ralpok
Joined: 21 Dec 2005 Posts: 25
|
SPI interrupt doesn't work after breakpoint |
Posted: Mon Nov 12, 2012 11:45 am |
|
|
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: 9216 Location: Greensville,Ontario
|
|
Posted: Mon Nov 12, 2012 12:08 pm |
|
|
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
|
|
Posted: Tue Nov 13, 2012 5:33 am |
|
|
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
|
|
Posted: Tue Nov 13, 2012 9:55 am |
|
|
I also expect an overflow condition. You can see it in the SPI status. |
|
|
|