Hello,
I'm currently programming a clock using an RTC there for I'm using SPI constantly. But I have this problem that when an interrupt occurs during an SPI transfer, when coming back from the ISR it stays stuck in a loop. Below is the code i use to send out data... Interrupt is high priority and I use RETFIE to return
MOVLW B'10101010'
MOVWF SSPBUF,A (AT SOME POINT INTERRUPT OCCURS)
LOOP
BTFSS SSPSTAT,BF
GOTO LOOP (THIS IS THE LOOP THAT IT STAYS STUCK IN)
Thanks
I'm currently programming a clock using an RTC there for I'm using SPI constantly. But I have this problem that when an interrupt occurs during an SPI transfer, when coming back from the ISR it stays stuck in a loop. Below is the code i use to send out data... Interrupt is high priority and I use RETFIE to return
MOVLW B'10101010'
MOVWF SSPBUF,A (AT SOME POINT INTERRUPT OCCURS)
LOOP
BTFSS SSPSTAT,BF
GOTO LOOP (THIS IS THE LOOP THAT IT STAYS STUCK IN)
Thanks