Content originally posted in LPCWare by Mawpe on Sat Sep 15 00:34:34 MST 2012
Hello
I'm new on this forum and in using Can on LPC11xx.
I think i understand how the can controller works, but I have some questions about Interrupt and RTR(remote frame).
Fist of all, is this table correct?
The registers is read be the interrupt handler.
RMTEN=1, UMASK=1
[B]Table:[/B]
[B]DIR[/B] [B]NEWDAT[/B] [B]TXRQSR[/B] [B]MSGLST[/B] - Values only reads from interrupt.
1 0 0 0 - Interrupt after succes Transmitting a data frame or RTR, OK
1010- Interrupt after Receive a RTR, in a transmit Message Object
1100- Not valid – (if DAR =0 then Transmitting fails, the CPU has to set TXRQST back to one)
1110- Not valid
0000- Not valid
0010- Not valid - This will send a RTR
0100- Interrupt after reception a data frame
0110- Not valid
0101- Interrupt after overrun of a Message Object
[B]Table notes:[/B]
DIR=1=TX; DIR=0=RX
[B]More questions:[/B]
[B]#1:[/B] If I have a transmit Message Object where DIR=1, TXIE=1, RXIE=0, RMTEN=1, UMASK=1, will I get an Interrupt when receiving a RTR?
[B]#2:[/B] If I have a receiving Message Object where DIR=0, TXIE=0, RXIE=1, RMTEN=1, UMASK=1, will I get an Interrupt when transmitting a RTR?
[B]#3:[/B] If I receiving a RTR, while preparing to transmit a data frame, what will happen? The RTR is lost?
[B]#4:[/B] My plan was to have 1 or 2 transmit Message Object, and the rest is receiving.
Will I have to make a transmit Message Object that only is used to receiving RTR?
Something like DIR=1, TXIE=0, RXIE=1, RMTEN=1 and UMASK=1.
[B]#5:[/B] “If the RMTEN bit is set, a matching received Remote Frame will cause the TXRQST bit to be set, and the Remote Frame will autonomously be answered by a Data Frame.” From datasheet.
“autonomously be answered” how is that?
[B]#6:[/B] There is a lot of filtering in the datasheet, but if I only use MDIR/DIR to filter, will all received data frames be placed in the first empty RX Message Object, or will all received data frames be put in one Message Object?
thank you in advance