All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jin Park <jpark@enphaseenergy.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	"manivannan.sadhasivam@linaro.org"
	<manivannan.sadhasivam@linaro.org>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: RE: Question on CAN FD Driver for mcp251xfd
Date: Fri, 20 Nov 2020 17:14:03 +0000	[thread overview]
Message-ID: <DM6PR19MB36739C691B6C35B4AD7DF77AB1FF0@DM6PR19MB3673.namprd19.prod.outlook.com> (raw)
In-Reply-To: <f168b9a4-79ae-7a8b-b074-632f86e8596b@pengutronix.de>

Hello Marc,

Here are my answers.
VAR-SOM-MX8M-Nano board drives MCP2517FD/MCP2518FD (CAN FD controller) and TCAN332G (CAN FD Transceiver) for CAN FD communication.

1) Which commands have you tried?
2) What are the error messages?
Please see below a), b), c), and d).

	a) Based on Bit Rate Switching feature in CAN FD, the bit rate at data phase and arbitration phase (or nominal phase) can be set in CAN FD protocol.
So, I tried below.
- command
ip link set can0 type can dbitrate 1000000

- error message
RTNETLINK answers: Operation not supported

	

	b) To turn on FD mode, I tried below.
- command
ip link set can0 type can fd on

- error message
RTNETLINK answers: Operation not supported



	c) To send CAN FD message, I tried below. Th
- command
cansend can0 123##1

- error message
CAN interface is not CAN FD capable - sorry.

- help text for cansend
    <can_id>#{R|data}          for CAN 2.0 frames
    <can_id>##<flags>{data}    for CAN FD frames

<can_id> can have 3 (SFF) or 8 (EFF) hex chars
{data} has 0..8 (0..64 CAN FD) ASCII hex-values (optionally separated by '.')
<flags> a single ASCII Hex value (0 .. F) which defines canfd_frame.flags

e.g. 5A1#11.2233.44556677.88 / 123#DEADBEEF / 5AA# / 123##1 / 213##311
     1F334455#1122334455667788 / 123#R for remote transmission request.





	d) TCAN332G (CAN FD Transceiver) can support 5Mbps at data phase in CAN FD mode. 
Current supported maximum bitrate in the driver is now 1Mbps at nominal rate.
(FYI, bit rate in data phase at CAN FD protocol is up to 8Mbps)
        Where: BITRATE  := { 1..1000000 }
                  SAMPLE-POINT  := { 0.000..0.999 }
                  TQ            := { NUMBER }
                  PROP-SEG      := { 1..8 }
                  PHASE-SEG1    := { 1..8 }
                  PHASE-SEG2    := { 1..8 }
                  SJW           := { 1..4 }
                  RESTART-MS    := { 0 | NUMBER }



3) What doesn't work exactly?

I would like to send and receive messages in CAN FD with Bit Rate Switching (Arbitration phase: 1Mbps, Data phase: 5Mbps).
So far, CAN FD mode doesn't turn on with above commands.

Thanks,
Jin


-----Original Message-----
From: Marc Kleine-Budde <mkl@pengutronix.de> 
Sent: Thursday, November 19, 2020 11:11 PM
To: Jin Park <jpark@enphaseenergy.com>; manivannan.sadhasivam@linaro.org
Subject: Re: Question on CAN FD Driver for mcp251xfd

Hello Jin Park,

please use the linux-can mailing list (linux-can@vger.kernel.org) for community question. There are other people interested in these question, please add list on Cc.

On 11/20/20 4:03 AM, Jin Park wrote:
> I am using MCP251XFD SPI-CAN Network Driver with VAR-SOM-MX8M-NANO 
> board now and would like to ask whether it can support CAN FD features as well.

Yes it does support CAN-FD.

> I tried to command with CAN FD features in terminal and it didn’t work 
> with CAN FD commands.

Which commands have you tried?
What are the error messages?
What doesn't work exactly?

> Is there any plan to release CAN FD Linux Driver in the future, if you 
> have worked on CAN FD?

It should be working.

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |


       reply	other threads:[~2020-11-20 17:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DM6PR19MB3673FBAAA7A80E458659666EB1FF0@DM6PR19MB3673.namprd19.prod.outlook.com>
     [not found] ` <f168b9a4-79ae-7a8b-b074-632f86e8596b@pengutronix.de>
2020-11-20 17:14   ` Jin Park [this message]
2020-11-20 18:34     ` Question on CAN FD Driver for mcp251xfd Oliver Hartkopp
2020-11-20 18:57       ` Jin Park
2020-11-20 19:04         ` Oliver Hartkopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR19MB36739C691B6C35B4AD7DF77AB1FF0@DM6PR19MB3673.namprd19.prod.outlook.com \
    --to=jpark@enphaseenergy.com \
    --cc=linux-can@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mkl@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.