From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Dong Aisheng <b29396@freescale.com>, linux-can@vger.kernel.org
Subject: new M_CAN IP rev 3.2.x documentation available - was: Re: M_CAN message RAM initialization AppNote
Date: Thu, 05 Feb 2015 20:04:55 +0100 [thread overview]
Message-ID: <54D3BED7.1050503@hartkopp.net> (raw)
In-Reply-To: <545BA039.7080108@hartkopp.net>
Hi all,
the new M_CAN IP rev 3.2.x documentation is available:
http://www.bosch-semiconductors.de/en/ubk_semiconductors/ip_modules_3/produkttabelle_ip_modules/m_can_1/m_can.html
http://www.bosch-semiconductors.de/media/pdf_1/ipmodules_1/m_can_m_ttcan/mcan_users_manual_v320.pdf
One of the changes is the fact that the new Tx Buffer Element (see page 49) has a FDF and BRS bit.
So the switching between CAN and CAN FD is done per message without fiddling the configuration registers each time.
Best regards,
Oliver
On 06.11.2014 17:22, Oliver Hartkopp wrote:
> Hello all, (reduced the CC list a bit)
>
> thankfully Mr. Hartwich from Bosch followed the mail threads I forwarded to
> him. It turns out that there's only ONE message RAM containing TX Buffers, RX
> Buffers and all the acceptance filter elements.
>
> Due to our discussion the next M_CAN user manual will contain the attached
> application note (see marked lines in attached PDF).
>
> Mr Hartwich wrote:
>
> ---8<--- snip!
>
> The RAM initialization issue is not limited to Tx Buffers, all RAM words need
> an initialization before they are read. If e.g. the CPU reads an uninitialized
> Rx Buffer before the M_CAN has stored a message into the buffer, that may
> trigger a RAM access error.
>
> There is only one single Message RAM attached to the M_CAN, which buffers
> are found where is configured via the registers SIDFC.FLSSA, XIDFC.FLESA,
> RXF0C.F0SA, RXF1C.F1SA, TXBC.TBSA, TXEFC.EFSA. The size of the area needed
> e.g. for the Tx Buffers depends on the number of Buffers and on the size of
> the buffers. Larger buffers are needed for the longer FD frames.
>
> The M_CAN does not check whether the RAM areas overlap, so this check needs to
> be done in software. It is also possible that several M_CANs share one single
> RAM, so the overlap-check needs to consider also that case.
>
> RAMs usually do not have a hardware-reset, so the RAM-cells, including the
> parity/ECC-bits (if exist) may be at invalid values. Any write to a RAM word
> will set the parity/ECC-bits to valid values. Therefore the entire RAM should
> be initialized by software after power-on, e.g. (simplistic):
>
> for (i=RAM_start; i<=RAM_end; i++) RAM[i] = 0x00000000;
>
> The size of the RAM may differ in different M_CAN implementations, the
> RAM is not part of the M_CAN IP module. There may be RAMs with parity,
> with ECC, or without protection. There may even be RAMs with hardware-reset.
>
> ---8<--- snip!
>
> So the recommendation is to initialize the entire message RAM (see PDF).
>
> Regards,
> Oliver
>
next prev parent reply other threads:[~2015-02-05 19:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 13:16 [PATCH V3 1/3] can: add can_is_canfd_skb() API Dong Aisheng
2014-11-05 13:16 ` [PATCH V3 2/3] can: m_can: update to support CAN FD features Dong Aisheng
2014-11-05 14:31 ` Marc Kleine-Budde
2014-11-05 14:42 ` Oliver Hartkopp
2014-11-05 13:16 ` [PATCH V3 3/3] can: m_can: workaround for transmit data less than 4 bytes Dong Aisheng
2014-11-05 14:29 ` Marc Kleine-Budde
2014-11-05 18:15 ` M_CAN message RAM initialization AppNote - was: " Oliver Hartkopp
2014-11-06 1:57 ` Dong Aisheng
2014-11-06 7:04 ` Oliver Hartkopp
2014-11-06 8:09 ` Dong Aisheng
2014-11-06 12:33 ` Oliver Hartkopp
2014-11-06 12:47 ` Marc Kleine-Budde
[not found] ` <545BA039.7080108@hartkopp.net>
2014-11-07 8:15 ` Dong Aisheng
2015-02-05 19:04 ` Oliver Hartkopp [this message]
2014-11-07 8:40 ` Dong Aisheng
2014-11-07 8:34 ` Dong Aisheng
2014-11-06 9:00 ` Marc Kleine-Budde
2014-11-05 16:22 ` [PATCH V3 1/3] can: add can_is_canfd_skb() API Eric Dumazet
2014-11-05 17:33 ` Oliver Hartkopp
2014-11-06 1:52 ` Dong Aisheng
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=54D3BED7.1050503@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=b29396@freescale.com \
--cc=linux-can@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).