Hello all:
First of all, thanks for that really good software Mr Taylor have developed , it is helping me a lot for developing my software.
The question is my interrupts routines are using PBP code (I2CREAD), but I started defining my interrupts as ASM type. All seems to work fine, but have some issues on HSEROUT calls so I realize that I have to use PBP type interrupts to solve it. But the question is that when I started to use PBP ones all stop working.
During some days I have been investigating this strange situation, and I have found a pseudo workaround that don't explain the issue.
My interrupt handler is that:
INT_READER:
I2CREAD i2c_rdr_SDA, i2c_rdr_SCL, rdr_I2C_DIR_SLAVE , [str RDR_I2C_BUFFER\RDR_I2C_BUFFER_SIZE], INT_READER_ERR
INT_READER_ERR:
@ INT_RETURN
The errors come when i use PBP interrupt. When i use it the I2CREAD routine don't read anything.
The Workaround: I have been making some tests, and the problem disappear if I comment a line in ReEnterPBP-18.bas
The line is at RestorePBP_H routine:
FLAGS = FLAGS_SaveH
When I comment this line all start working. WHY?
As I can see in Mr Taylor's code, this routine is executed once the interrupt routine is finished, so I don't understand why this affect the I2CREAD routine. Maybe this line makes the I2C routines to go "disabled"???? (the FLAGS var is used to control PBP I2C MASTER routines)
Any suggestions will be welcome, thanks in advance...
dcorraliza
Bookmarks