<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Flexcan Communication issue with IMX-53 SABRE AI Rev B Board in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Flexcan-Communication-issue-with-IMX-53-SABRE-AI-Rev-B-Board/m-p/246081#M21438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;After few days the issue was resolved. The following steps are followed to solve the issue&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/OLIMEX/archlinuxarm-olinuxino/blob/master/olinuxino/kernel26-olinuxino/1144-ENGR00169603-MX53-ARD-FlexCAN-Set-lp_apm-as-clock.patch"&gt;https://github.com/OLIMEX/archlinuxarm-olinuxino/blob/master/olinuxino/kernel26-olinuxino/1144-ENGR00169603-MX53-ARD-FlexCAN-Set-lp_apm-as-clock.patch&lt;/A&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;1.&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"&gt;Go to location&lt;BR /&gt;/ltib/rpm/BUILD/linux-2.6.35.3/arch/arm/mach-mx5 &lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"&gt;Edit file&lt;BR /&gt;mx53_ard.c&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"&gt;Update &lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="margin-right: 75pt; color: #333333; background: white; font-size: 9pt; font-family: Consolas;"&gt;static&lt;BR /&gt;struct flexcan_platform_data flexcan0_data = {&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;.core_reg = NULL,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt; .io_reg = NULL,&lt;/SPAN&gt;&amp;nbsp; &lt;STRONG style="color: red; font-size: 12pt; font-family: Consolas;"&gt;+ .root_clk_id = "lp_apm",&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.xcvr_enable = flexcan_xcvr_enable,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.br_clksrc = 1,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.br_rjw = 2,&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"&gt;Update &lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;static&lt;BR /&gt;struct flexcan_platform_data flexcan1_data = {&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.core_reg = NULL,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.io_reg = NULL,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: red; font-size: 12pt; font-family: Consolas;"&gt;+ .root_clk_id = "lp_apm",&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.xcvr_enable = flexcan_xcvr_enable,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.br_clksrc = 1,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt; mso-fareast-font-family: 'ＭＳ 明朝'; mso-fareast-theme-font: minor-fareast; mso-ansi-language: EN-IN; mso-fareast-language: JA; mso-bidi-language: AR-SA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.br_rjw = 2,&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jul 2013 04:33:30 GMT</pubDate>
    <dc:creator>tonythomas</dc:creator>
    <dc:date>2013-07-02T04:33:30Z</dc:date>
    <item>
      <title>Flexcan Communication issue with IMX-53 SABRE AI Rev B Board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Flexcan-Communication-issue-with-IMX-53-SABRE-AI-Rev-B-Board/m-p/246078#M21435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H3 style="margin: 7.5pt 0px 13pt;"&gt;&lt;SPAN style="color: #333333; font-family: 'Arial','sans-serif'; font-size: 13pt; font-weight: normal; mso-fareast-font-family: 'Times New Roman';"&gt;Hi, &lt;BR /&gt;&lt;BR /&gt;While transmitting CAN message using FLEXCANdriver the CAN ACK error is&lt;BR /&gt;occurring frequently. The error (as obtained from the print in the error handler) is given below&lt;BR /&gt;&lt;BR /&gt;_______________ ENTEREDflexcan_err_handler__________________&lt;BR /&gt;&lt;BR /&gt;____flexcan_err_handler_after____raw_readl__esr&amp;nbsp; =2152__&lt;BR /&gt;&lt;BR /&gt;____flexcan_err_handler_after__raw_writel__esr&amp;nbsp; =2152__&lt;BR /&gt;&lt;BR /&gt;____flexcan_err_handler___skb =df4e0f00__&lt;BR /&gt;&lt;BR /&gt;_flexcan_err_handle &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; if(esr &amp;amp; __ESR_ACK_ERR)__&lt;BR /&gt;&lt;BR /&gt;_flexcan_err_handle &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;if(__ECR_RX_ERR_COUNTER(ecr) &amp;gt;=&lt;BR /&gt;__ECR_PASSIVE_THRESHO&lt;BR /&gt;&lt;BR /&gt;_______________ EXITflexcan_err_handler__________________&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The details of test&amp;nbsp; set up&lt;/STRONG&gt;&lt;BR /&gt;a.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BoardName – IMX-53 SABRE AI Rev B&lt;BR /&gt;b.&amp;nbsp;&amp;nbsp;&amp;nbsp; Linuxkernel version of the BSP&amp;nbsp; -&amp;nbsp; 2.6.35.3-850-gbc67621-g53145ea-dirty&lt;BR /&gt;c.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BSPversion - L2.6.35_11.03_ER_source_bundle&lt;BR /&gt;d.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN Test utility – IXXAT usb to can compact&lt;BR /&gt;e.&amp;nbsp;&amp;nbsp;&amp;nbsp; Installledcanutils and libsocketcan. The driver attributes are seen in/sys/devices/platform/FlexCAN.1/ and Flexcan0 (Ref: &lt;A _jive_internal="true" data-containerid="2004" data-containertype="14" data-objectid="1437" data-objecttype="102" href="https://community.nxp.com/docs/DOC-1437"&gt;https://community.freescale.com/docs/DOC-1437&lt;/A&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Steps followed after the system is booted &lt;/STRONG&gt;(The CAN2 header in the Evaluation board is connected with CAN analyzer IXXAT USB to CAN compact)&lt;BR /&gt;a.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tried with baud rate of 1Mbps with the setting done under /sys/devices/platform/FlexCAN.1&lt;BR /&gt;b.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: 'Arial','sans-serif'; font-size: 13pt; font-weight: normal; mso-fareast-font-family: 'Times New Roman';"&gt;br_Propseg =4; br_Pseg2=2; br_Pseg1=1;br_rjw =1 ; br_presdiv =3, br_clksrc = osc(CAN1 clk 24Mhz) (Set by "ech0 val &amp;gt;br_xyz")&lt;BR /&gt;c.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ifconfig CAN1 up&lt;BR /&gt;d.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cansend can1 -i0x100 11 22 33 44&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using the oscilloscope verified the following&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;a.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN_STDBY and CAN_EN of MC33902 CAN transceiver both high&lt;BR /&gt;b.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; While transmitting there is activity in the CAN H and CAN L pin of MC33902transceiver.&lt;BR /&gt;c.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bus activity in the CAN2_TXD and CAN2_RXD of the controller lines&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;Request to help in this to resolve&amp;nbsp; the issue. Thanks&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Tony Thomas&lt;/SPAN&gt;&lt;/H3&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 07:31:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Flexcan-Communication-issue-with-IMX-53-SABRE-AI-Rev-B-Board/m-p/246078#M21435</guid>
      <dc:creator>tonythomas</dc:creator>
      <dc:date>2013-05-20T07:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Flexcan Communication issue with IMX-53 SABRE AI Rev B Board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Flexcan-Communication-issue-with-IMX-53-SABRE-AI-Rev-B-Board/m-p/246079#M21436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m the administrator of the i.MX community. I moved your question out to the message boards so the experts can read and answer your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jodi Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 17:44:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Flexcan-Communication-issue-with-IMX-53-SABRE-AI-Rev-B-Board/m-p/246079#M21436</guid>
      <dc:creator>jodipaul</dc:creator>
      <dc:date>2013-05-20T17:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Flexcan Communication issue with IMX-53 SABRE AI Rev B Board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Flexcan-Communication-issue-with-IMX-53-SABRE-AI-Rev-B-Board/m-p/246080#M21437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;Checked the IO Mux control and Pad control register settings in mx53_ard.c (\arch\arm\mach-mx5) and iomux-mx53.c (\arch\arm\plat-mxc\include\mach). The settings are performed correctly for CAN TX, CAN RX pins.&lt;/P&gt;&lt;P&gt;Currently I am checking the CAN bus with vector CANalyzer&lt;/P&gt;&lt;P&gt;There is a bus activity in the can TX pins while initiating the transmission using&lt;/P&gt;&lt;P&gt;ifconfig can1 up &lt;/P&gt;&lt;P&gt;cansend can1 -i0x100 11 22 33 44 &lt;/P&gt;&lt;P&gt;However no activity is availble at the CANH and CANL lines of the MC33902 transceiver.&lt;/P&gt;&lt;P&gt;The STBY and EN pin of the MC33902 trasceiver is probed and is indicating high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my BSP source, I could not find the Flexcan.c source file. The drv.c file in the "\drivers\net\can\flexcan" does the driver initialisation.&lt;/P&gt;&lt;P&gt;1. Is there a patch availabe for Flexcan for the BSP I am using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any input to resolve this issue is highly helpful&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tony Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 15:48:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Flexcan-Communication-issue-with-IMX-53-SABRE-AI-Rev-B-Board/m-p/246080#M21437</guid>
      <dc:creator>tonythomas</dc:creator>
      <dc:date>2013-05-22T15:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Flexcan Communication issue with IMX-53 SABRE AI Rev B Board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Flexcan-Communication-issue-with-IMX-53-SABRE-AI-Rev-B-Board/m-p/246081#M21438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;After few days the issue was resolved. The following steps are followed to solve the issue&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/OLIMEX/archlinuxarm-olinuxino/blob/master/olinuxino/kernel26-olinuxino/1144-ENGR00169603-MX53-ARD-FlexCAN-Set-lp_apm-as-clock.patch"&gt;https://github.com/OLIMEX/archlinuxarm-olinuxino/blob/master/olinuxino/kernel26-olinuxino/1144-ENGR00169603-MX53-ARD-FlexCAN-Set-lp_apm-as-clock.patch&lt;/A&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;1.&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"&gt;Go to location&lt;BR /&gt;/ltib/rpm/BUILD/linux-2.6.35.3/arch/arm/mach-mx5 &lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"&gt;Edit file&lt;BR /&gt;mx53_ard.c&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"&gt;Update &lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="margin-right: 75pt; color: #333333; background: white; font-size: 9pt; font-family: Consolas;"&gt;static&lt;BR /&gt;struct flexcan_platform_data flexcan0_data = {&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;.core_reg = NULL,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt; .io_reg = NULL,&lt;/SPAN&gt;&amp;nbsp; &lt;STRONG style="color: red; font-size: 12pt; font-family: Consolas;"&gt;+ .root_clk_id = "lp_apm",&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.xcvr_enable = flexcan_xcvr_enable,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.br_clksrc = 1,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.br_rjw = 2,&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"&gt;Update &lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;static&lt;BR /&gt;struct flexcan_platform_data flexcan1_data = {&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.core_reg = NULL,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.io_reg = NULL,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: red; font-size: 12pt; font-family: Consolas;"&gt;+ .root_clk_id = "lp_apm",&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.xcvr_enable = flexcan_xcvr_enable,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.br_clksrc = 1,&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas; font-size: 9pt; mso-fareast-font-family: 'ＭＳ 明朝'; mso-fareast-theme-font: minor-fareast; mso-ansi-language: EN-IN; mso-fareast-language: JA; mso-bidi-language: AR-SA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;.br_rjw = 2,&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 04:33:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Flexcan-Communication-issue-with-IMX-53-SABRE-AI-Rev-B-Board/m-p/246081#M21438</guid>
      <dc:creator>tonythomas</dc:creator>
      <dc:date>2013-07-02T04:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Flexcan Communication issue with IMX-53 SABRE AI Rev B Board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Flexcan-Communication-issue-with-IMX-53-SABRE-AI-Rev-B-Board/m-p/246082#M21439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14482427338077982 jive_macro_code jive_text_macro" data-renderedposition="8_8_1234_16" jivemacro_uid="_14482427338077982"&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&amp;gt; &lt;SPAN style="color: #333333; font-family: 'Arial','sans-serif'; font-size: 13pt; font-weight: normal; mso-fareast-font-family: 'Times New Roman';"&gt;br_clksrc=osc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Arial','sans-serif'; font-size: 13pt; font-weight: normal; mso-fareast-font-family: 'Times New Roman';"&gt;That only works on an i.MX35 board, and not on an i.MX53.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Arial','sans-serif'; font-size: 13pt; font-weight: normal; mso-fareast-font-family: 'Times New Roman';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;The driver happily assumes it is running on an i.MX35, and selects either the 66.5MHz bus clock or the 24.576MHz oscillator. Good luck trying to divide 24.576 down to any normal CAN baud rate with the required fractional-percent baud rate accuracy though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On an i.MX53, the clock is - tricky. In the Reference Manual, bit FLEXCANx_CTRL[13] is called "-", marked "Reserved", but confusingly says it selects the 66.5 or 24.576 MHz clocks. It doesn't. That section was pasted in out of the i.MX35 manual and not properly edited. The Flexcan baud rate clock selection is handled in the i.MX53 by CCM_CSCMR2[CAN_CLK_SEL].&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That, as you found, is set up by getting the platform to select the 24MHz "lp_apm" clock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are plenty of other problems with the documentation and the driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "mx53_linux.pdf" document states:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14482429294725688" data-renderedposition="375_8_1234_32" jivemacro_uid="_14482429294725688" modifiedtitle="true"&gt;&lt;P&gt;bitrate configures the bitrate. Currenlty, [sic] this parameter only shows the bitrate that is supported.
To ensure bitrate exactly, set the individual parameters:&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The driver in drivers/net/can/flexcan/dev.c has the comment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14482427475923248 jive_text_macro" data-renderedposition="470_8_1234_112" jivemacro_uid="_14482427475923248" modifiedtitle="true"&gt;&lt;P&gt; static void flexcan_set_bitrate(struct flexcan_device *flexcan, int bitrate)
 {
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* TODO:: implement in future
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * based on the bitrate to get the timing of
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * presdiv, pseg1, pseg2, propseg
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */

&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following commit added all the code to set the bit rate, but then left the above comment in the code!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="_jivemacro_uid_14482428189292470 jive_macro_code jive_text_macro" data-renderedposition="645_8_1234_192" jivemacro_uid="_14482428189292470"&gt;&lt;P&gt;&lt;SPAN&gt;Author: William Lai &amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:b04597@freescale.com" rel="nofollow noopener noreferrer" target="_blank"&gt;b04597@freescale.com&lt;/A&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp; 2010-04-21 12:20:44&lt;/SPAN&gt;
&lt;SPAN&gt;Committer: William Lai &amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:b04597@freescale.com" rel="nofollow noopener noreferrer" target="_blank"&gt;b04597@freescale.com&lt;/A&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp; 2010-04-22 17:10:20&lt;/SPAN&gt;
Parent: e783aee7a0b858727595a1416e901dee08e96bc2 (ENGR00122399-2 MX53 CAN: MBM word access only)
Branches: remotes/origin/remote/freescale/imx_2.6.31, remotes/origin/remote/freescale/imx_2.6.31_10.05.02, &lt;/P&gt;&lt;P&gt;remotes/origin/remote/freescale/imx_2.6.31_10.07.11, remotes/origin/remote/freescale/imx_2.6.31_10.08.01
Follows: rel_imx_2.6.31_10.03.00
Precedes: rel-imx-2.6.31-10.08.00, rel_imx_2.6.31_10.05.02, rel_imx_2.6.31_10.07.11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENGR00122723 CAN: Enable the adaptive bitrate setting

&amp;nbsp;&amp;nbsp;&amp;nbsp; Enable the adaptive bitrate setting, according to the clock rate.
&amp;nbsp;&amp;nbsp;&amp;nbsp; And the bitrate can be changed by the proc file.&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above change was made in 2.6.31, earlier and 5 months before "mx53_linux.pdf" stated that 2.6.35.3 didn't support setting the bitrate when it does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's a bug in the driver in its reporting of the RJW as well. Here's the setting and reporting code. Spot the difference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14482430827364418 jive_macro_code jive_text_macro" data-renderedposition="942_8_1234_528" jivemacro_uid="_14482430827364418" modifiedtitle="true"&gt;&lt;P&gt;static ssize_t flexcan_set_attr(struct device *dev,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; struct device_attribute *attr, const char *buf,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size_t count)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp;&amp;nbsp; case FLEXCAN_ATTR_BR_RJW:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flexcan-&amp;gt;br_rjw = tmp - 1;

&amp;nbsp;&amp;nbsp;&amp;nbsp; case FLEXCAN_ATTR_BR_PROPSEG:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flexcan-&amp;gt;br_propseg = tmp - 1;

&amp;nbsp;&amp;nbsp;&amp;nbsp; case FLEXCAN_ATTR_BR_PSEG1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flexcan-&amp;gt;br_pseg1 = tmp - 1;

&amp;nbsp;&amp;nbsp;&amp;nbsp; case FLEXCAN_ATTR_BR_PSEG2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flexcan-&amp;gt;br_pseg2 = tmp - 1;


static ssize_t flexcan_show_attr(struct device *dev,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; struct device_attribute *attr, char *buf)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp;&amp;nbsp; case FLEXCAN_ATTR_BR_PRESDIV:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return sprintf(buf, "%d\n", flexcan-&amp;gt;br_presdiv + 1);
&amp;nbsp;&amp;nbsp;&amp;nbsp; case FLEXCAN_ATTR_BR_RJW:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return sprintf(buf, "%d\n", flexcan-&amp;gt;br_rjw);
&amp;nbsp;&amp;nbsp;&amp;nbsp; case FLEXCAN_ATTR_BR_PROPSEG:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return sprintf(buf, "%d\n", flexcan-&amp;gt;br_propseg + 1);
&amp;nbsp;&amp;nbsp;&amp;nbsp; case FLEXCAN_ATTR_BR_PSEG1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return sprintf(buf, "%d\n", flexcan-&amp;gt;br_pseg1 + 1);
&amp;nbsp;&amp;nbsp;&amp;nbsp; case FLEXCAN_ATTR_BR_PSEG2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return sprintf(buf, "%d\n", flexcan-&amp;gt;br_pseg2 + 1);

&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It sets the RJW properly, but forgets to add one to the field when printing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 01:52:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Flexcan-Communication-issue-with-IMX-53-SABRE-AI-Rev-B-Board/m-p/246082#M21439</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2015-11-23T01:52:33Z</dc:date>
    </item>
  </channel>
</rss>

