I am using Vectored Interrupts. I have enabled the CAN Transmit
interrupt to notify me when a transmission was successful so that I
can transmit another message out of my message buffer. Unfortunately,
I cannot deassert the interrupt as the ISR continues to get called
repeatedly. I have tried several things including reading the CANICR
register, etc. The end of the interrupt routine does a VICVectAddr =
0xffffffff; I am using the Keil IDE and GNU/CC Compiler Tool Chain.
None of the CAN examples use a transmit interrupt to send messages
out of a buffer. I thought of a scheme that might where I
enable/disable the interrupt, but there has to be a better way.
Pseudocode looks something like this:
If a hardware transmit buffer is available
Send message directly
else
Add message to software buffer
end if
And then in the transmit interrupt routine:
while software buffer is not empty and there is a hardware buffer
available
get message from software buffer
put message into a hardware buffer
VICVectAddr = 0xffffffff; // Acknowledge Interrupt
If I test the code by sending one message, the routine sends it out
and then the interrupt routine is called to signify that the
transmission is complete. However, simply executing the routine does
not acknowledge the interrupt and it gets called repeatedly. Any
ideas?
Thanks,
JTMessage
Philips LCP2129 CAN Transmit Interrupt
2004-07-10 by johnthomasedwardtimm
Attachments
- No local attachments were found for this message.