All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Huettel Mario (AE/PJ-SCI1)" <Mario.Huettel@de.bosch.com>
To: "Yang, Wenyou" <Wenyou.Yang@Microchip.com>,
	Quentin Schulz <quentin.schulz@free-electrons.com>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: AW: AW: [PATCH v4 7/7] can: m_can: Enable TX FIFO Handling for M_CAN IP version >= v3.1.x
Date: Tue, 18 Apr 2017 06:37:15 +0000	[thread overview]
Message-ID: <08778831b16748f487c1c396a0811d00@SI-MBX1034.de.bosch.com> (raw)
In-Reply-To: <ade4d7b4-a440-98ce-3c66-684136cffde7@Microchip.com>

Hello Wenyou,

I think I've found something suspicious:
*Both* M_CAN nodes are configured like this:
> bosch,mram-cfg = <0x0 0 0 32 0 0 0 1>;

This means they're operating in the same memory region with exactly the same memory layout.
This does not have to be the cause of your problem but I think this is an error.


-----Ursprüngliche Nachricht-----
Von: Yang, Wenyou [mailto:Wenyou.Yang@Microchip.com] 
Gesendet: Dienstag, 18. April 2017 08:18
An: Huettel Mario (AE/PJ-SCI1) <Mario.Huettel@de.bosch.com>; Quentin Schulz <quentin.schulz@free-electrons.com>
Cc: linux-can@vger.kernel.org
Betreff: Re: AW: [PATCH v4 7/7] can: m_can: Enable TX FIFO Handling for M_CAN IP version >= v3.1.x

Hi Mario,

The device tree patch is attached.

Here is the configure and log.

---8<----

# ip link set can0 type can bitrate 125000 dbitrate 4000000 fd on 
fd-non-iso on
# ip link set can1 type can bitrate 125000 dbitrate 4000000 fd on 
fd-non-iso on
# ip link set can0 up
# ip link set can1 up
# ip -details link show can0
2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UNKNOWN 
mode DEFAULT group default qlen 10
     link/can  promiscuity 0
     can <FD,FD-NON-ISO> state ERROR-ACTIVE (berr-counter tx 0 rx 0) 
restart-ms 0
           bitrate 125000 sample-point 0.875
           tq 50 prop-seg 69 phase-seg1 70 phase-seg2 20 sjw 1
           m_can: tseg1 2..256 tseg2 1..128 sjw 1..128 brp 1..512 brp-inc 1
           dbitrate 4000000 dsample-point 0.700
           dtq 25 dprop-seg 3 dphase-seg1 3 dphase-seg2 3 dsjw 1
           m_can: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..32 dbrp-inc 1
           clock 40000000
# ip -details link show can1
3: can1: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UNKNOWN 
mode DEFAULT group default qlen 10
     link/can  promiscuity 0
     can <FD,FD-NON-ISO> state ERROR-ACTIVE (berr-counter tx 0 rx 0) 
restart-ms 0
           bitrate 125000 sample-point 0.875
           tq 50 prop-seg 69 phase-seg1 70 phase-seg2 20 sjw 1
           m_can: tseg1 2..256 tseg2 1..128 sjw 1..128 brp 1..512 brp-inc 1
           dbitrate 4000000 dsample-point 0.700
           dtq 25 dprop-seg 3 dphase-seg1 3 dphase-seg2 3 dsjw 1
           m_can: dtseg1 1..32 dtseg2 1..16 dsjw 1..16 dbrp 1..32 dbrp-inc 1
           clock 40000000
# candump can1 &
#  cansend can0 5A1##111.22.33.44.55.66.77.88.99.aa.bb.cc
   can1  5A1  [12]  11 22 33 44 55 66 77 88 99 AA BB CC
#  cansend can0 5A1##111.22.33.44.55.66.77.88.99.aa.bb.cc
#

--->8----

Hope it is helpful for you.

Any question, please don't hesitate to come back.


Best Regards,

Wenyou Yang


On 2017/4/18 14:04, Huettel Mario (AE/PJ-SCI1) wrote:
> Hi Quentin, hi Wenyou,
>
> Today I've received another email that the driver is not working with the
> M_CAN in Atmel's SAMA5D2.
>
> Can you send me the device tree you're using and post the dmesg output
> of the m_can driver?
>
> There might be a clue why it isn't working.
> The fact that it is working one time and then stops working looks like some problem
> In the TX FIFO to me. Can you please check with some third device/oscilloscope,
> if the controller is sending data. I want to know ehre the problem lies. If it's in the TX or
> RX path.
>
> As for now I can only throw some ideas into the round:
> * What are the PCLK and CCLK values? CCLK >= PCLK?
> * TX FIFO configured to one element and something happens in that case.
> * No TX Event FIFO element configured. The driver also doesn't work in this case.
>
>
> Quentin wrote:
>> Hi Oliver,
>>
>> On 13/04/2017 08:30, Oliver Hartkopp wrote:
>>> Hi Wenyou,
>>>
>>> as Quentin had no problems in his setup:
>>>
>> Actually just retested by doing the same as Wenyou on my SAMA5D2
>> Xplained and I can attest I'm having the same behavior as Wenyou.
>>
>> Best regards,
>> Quentin
>
> \x13��칻\x1c�&�~�&�\x18��+-��ݶ\x17��w��˛���m�b��\jx��\x17��ܨ}���Ơz�&j:+v���\r����zZ+��+zf���h���~����i���z�\x1e�w���?����&�)ߢ^[f


  reply	other threads:[~2017-04-18  6:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-08 12:10 [PATCH v4 1/7] can: m_can: Disabled Interrupt Line 1 Mario Hüttel
2017-04-08 12:10 ` [PATCH v4 2/7] can: m_can: Removed initialization of FIFO water marks Mario Hüttel
2017-04-08 12:10 ` [PATCH v4 3/7] can: m_can: Removed virtual address from print Mario Hüttel
2017-04-08 12:10 ` [PATCH v4 4/7] can: m_can: Updated register defines to newest version Mario Hüttel
2017-04-08 12:10 ` [PATCH v4 5/7] can: m_can: Enable M_CAN version dependent initialization Mario Hüttel
2017-04-08 12:10 ` [PATCH v4 6/7] can: m_can: Configuration for TX and TX event FIFOs Mario Hüttel
2017-04-08 12:10 ` [PATCH v4 7/7] can: m_can: Enable TX FIFO Handling for M_CAN IP version >= v3.1.x Mario Hüttel
     [not found]   ` <1f88411b-aa58-4e17-02cb-43fc0ffb953c@Microchip.com>
2017-04-13  6:30     ` Oliver Hartkopp
2017-04-13  6:50       ` Quentin Schulz
2017-04-18  6:04         ` AW: " Huettel Mario (AE/PJ-SCI1)
2017-04-18  6:17           ` Yang, Wenyou
2017-04-18  6:37             ` Huettel Mario (AE/PJ-SCI1) [this message]
2017-04-18  6:50             ` AW: " Huettel Mario (AE/PJ-SCI1)
2017-04-18  6:52               ` Wenyou.Yang
2017-04-19  7:11               ` AW: " Yang, Wenyou
2017-04-14  6:04       ` Yang, Wenyou
     [not found]     ` <0f51bfad-b6ac-6cb5-0487-5b746eecb8b7@Microchip.com>
2017-04-19 13:05       ` Quentin Schulz
2017-04-19 13:08       ` 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=08778831b16748f487c1c396a0811d00@SI-MBX1034.de.bosch.com \
    --to=mario.huettel@de.bosch.com \
    --cc=Wenyou.Yang@Microchip.com \
    --cc=linux-can@vger.kernel.org \
    --cc=quentin.schulz@free-electrons.com \
    /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.