LPC4357 CAN send RTR Frames

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC4357 CAN send RTR Frames

669 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Georg on Mon Dec 08 01:55:50 MST 2014
Hi,

i use the CAN interface of LPC4357. I can send and receive masseges on CAN0 and CAN1.
I can receive RTR masseges but i can't send one.

Which flag i had to set to send a rtr frame?

Thx.

Regards,
Georg.

Labels (1)
0 Kudos
4 Replies

528 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Georg on Mon Dec 08 06:00:46 MST 2014
Hi,

thx... now i understand how it works and now i can send rtr frames.

regards,

Georg.
0 Kudos

528 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Mon Dec 08 05:41:49 MST 2014
My apologies, I assumed that the CAN block would (should) be the same across part variants.

As a penance, I looked into the UM10503 ...

Apparently, to send a remote request you set the TXRQST of a receive message object.
[Not exactly intuitive!]
See the italicised quote from the UM below.

I leave you to sort out the details as I only just got my head round the simple CAN controller
in the 1778.

Regards, Mike

44.7.3.9 Handling of received messages
The CPU may read a received message any time via the IFx Interface registers. The data 
consistency is guaranteed by the Message Handler state machine.
To transfer the entire received message from message RAM into the message buffer, 
software must write first 0x007F to the Command Mask Register and then the number of 
the Message Object to the Command Request Register. Additionally, the bits NEWDAT 
and INTPND are cleared in the Message RAM (not in the Message Buffer).
If the Message Object uses masks for acceptance filtering, the arbitration bits show which 
of the matching messages has been received.
The actual value of NEWDAT shows whether a new message has been received since 
last time this Message Object was read. The actual value of MSGLST shows whether 
more than one message has been received since last time this Message Object was read. 
MSGLST will not be automatically reset.
[color=#c06]Using a Remote Frame, the CPU may request another CAN node to provide new data for 
a receive object. Setting the TXRQST bit of a receive object will cause the transmission of 
a Remote Frame with the receive object’s identifier. This Remote Frame triggers the other 
CAN node to start the transmission of the matching Data Frame. If the matching Data 
Frame is received before the Remote Frame could be transmitted, the TXRQST bit is 
automatically reset.[/color]


Italics mine.
0 Kudos

528 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Georg on Mon Dec 08 04:06:15 MST 2014
Hi,

on LPC4357 a Transmit Frame Information register does not exist.
I think i have to set a bit in one of the massege interfac e register. Some one in arbitrationregister? But i cant find
something in the datasheet.

Thx.

Georg.
0 Kudos

528 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Mon Dec 08 03:48:22 MST 2014
Set a bit in the CAN TX Info register.
On LPC1778, CAN Transmit Frame Information register (CAN1TFI[1/2/3]) bit 30 = RTR
NB: Still set the (desired) data byte count.

HTH, Mike

PS this is bleeding obvious if you RTFM!
0 Kudos