<?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: Wrong baudrate flexcan demo &amp;quot;interrupt transfer&amp;quot; on FRDM-KV11Z SDK 2.7.0 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068463#M57229</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Kerry. It works!&lt;/P&gt;&lt;P&gt;Really valuable, I was stuck for a while.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevertheless I have difficulties understanding how I might had found the same values that you got following this step by step example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106378i2BCE5EEB27B6CBDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's assume Baurate is 250Kbps and MCU clock is 10MHz&lt;BR /&gt;NBT x Prescaler = 40 (NBT = 8, Prescaler = 5)&lt;BR /&gt;Let's assume PROP_SEG is 1 because the CAN bus is really short.&lt;BR /&gt;NBT - 1Tq - PROP_SEG = 6&lt;BR /&gt;So PHASE_SEG1 and PHASE_SEG2 = 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know how do you get &lt;BR /&gt;#define PSEG1 4&lt;BR /&gt;#define PSEG2 1&lt;BR /&gt;#define PROPSEG 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain your calculation please ?&lt;/P&gt;&lt;P&gt;Moreover in your previous post, baudrate 250K or 1M do not have any impact on PSEG1, PSEG2 or PROPSEG.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2020 13:15:07 GMT</pubDate>
    <dc:creator>robertoquilez</dc:creator>
    <dc:date>2020-05-13T13:15:07Z</dc:date>
    <item>
      <title>Wrong baudrate flexcan demo "interrupt transfer" on FRDM-KV11Z SDK 2.7.0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068460#M57226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When run the flexcan driver demo (nterrupt transfer) out of the box, the baudrate is supposed to be 1Mbps but at the oscilloscope we "see" only&amp;nbsp; 138.9 KHz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can we set the baudrate properly? We would like to get 250Kbps, but we are unable to get that baudrate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here&amp;nbsp;&lt;A class="link-titled" href="http://www.bittiming.can-wiki.info/" title="http://www.bittiming.can-wiki.info/"&gt;CAN Bit Time Calculation&lt;/A&gt;&amp;nbsp;&amp;nbsp;we observe that no baud rate is compatible with 75MHz as core clock as configured&amp;nbsp; by default in the demo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your support,&lt;/P&gt;&lt;P&gt;Roberto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2020 10:31:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068460#M57226</guid>
      <dc:creator>robertoquilez</dc:creator>
      <dc:date>2020-05-11T10:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong baudrate flexcan demo "interrupt transfer" on FRDM-KV11Z SDK 2.7.0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068461#M57227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="289632" data-username="robertoquilez" href="https://community.nxp.com/people/robertoquilez" style="color: #3d9ce7; background-color: #ffffff; border: 0px; font-weight: 600; text-decoration: underline; font-size: 11.9994px;"&gt;Roberto Quilez&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You are using this code:&lt;/P&gt;&lt;P&gt;SDK_2.7.0_FRDM-KV11Z\boards\frdmkv11z\driver_examples\flexcan\interrupt_transfer&lt;/P&gt;&lt;P&gt;Right?&lt;/P&gt;&lt;P&gt;If the tool don't have the related 250Kbps, you can calculate by yourself, just find the proper&amp;nbsp;PSEG1,&amp;nbsp;PSEG2 and&amp;nbsp;PROPSEG.&lt;/P&gt;&lt;P&gt;You can refer to the example to calculate it:&lt;/P&gt;&lt;P&gt;for e.g. 84M clock and 1M baud rate, the&lt;BR /&gt; quantum should be .e.g 14=(6+3+1)+4, so prescaler is 6. By default, quantum&lt;BR /&gt; is set to 10=(3+2+1)+4, because for most platforms e.g. 120M source clock/(1M&lt;BR /&gt; baud rate * 10) is an integer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, tomorrow, I will help you to test it.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Kerry&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2020 10:57:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068461#M57227</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2020-05-12T10:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong baudrate flexcan demo "interrupt transfer" on FRDM-KV11Z SDK 2.7.0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068462#M57228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 12.6px;"&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" data-avatarid="-1" data-content-finding="Community" data-userid="289632" data-username="robertoquilez" href="https://community.nxp.com/people/robertoquilez" style="color: #3d9ce7; border: 0px; font-weight: inherit; text-decoration: underline; font-size: 1.1em; padding: 0px 3px 0px 0px;"&gt;Roberto Quilez&lt;/A&gt;,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 12.6px;"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;Thanks for your question.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Today, I check the SDK code on my side,&amp;nbsp;frdmkv11z_flexcan_interrupt_transfer. SDK2.7.0.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Find some code bugs, and I have modify it, it can transfer the 1Mbps and the 250Kbps now.&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1. 1Mbps Modification points:&amp;nbsp;&lt;/P&gt;&lt;P&gt;1)&lt;BR /&gt;/*#define PSEG1 5&lt;BR /&gt;#define PSEG2 2&lt;BR /&gt;#define PROPSEG 1&lt;BR /&gt;*/&lt;/P&gt;&lt;P&gt;#define PSEG1 4&lt;BR /&gt;#define PSEG2 1&lt;BR /&gt;#define PROPSEG 1&lt;/P&gt;&lt;P&gt;2) #define EXAMPLE_CAN_CLK_FREQ 10000000//CLOCK_GetFreq(kCLOCK_CoreSysClk)&lt;BR /&gt;or #define EXAMPLE_CAN_CLK_FREQ CLOCK_GetFreq(kCLOCK_Osc0ErClk)&lt;/P&gt;&lt;P&gt;Just select the external 10Mhz crystal as the clock source.&lt;/P&gt;&lt;P&gt;#define EXAMPLE_CAN_CLK_SOURCE (kFLEXCAN_ClkSrc0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;flexcanConfig.clkSrc = EXAMPLE_CAN_CLK_SOURCE;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106759i247052AF8E33F54E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Test Result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106722i6680FA84550B174C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. Your desired 250Kbps modified points:&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1)&amp;nbsp;&lt;/P&gt;&lt;P&gt;//250Kbps&lt;BR /&gt;#define PSEG1 4&lt;BR /&gt;#define PSEG2 1&lt;BR /&gt;#define PROPSEG 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&amp;nbsp;&lt;SPAN&gt;void FLEXCAN_GetDefaultConfig(flexcan_config_t *pConfig) in fsl_flexcan.c&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;void FLEXCAN_GetDefaultConfig(flexcan_config_t *pConfig)&lt;BR /&gt;{&lt;BR /&gt; /* Assertion. */&lt;BR /&gt; assert(NULL != pConfig);&lt;/P&gt;&lt;P&gt;/* Initializes the configure structure to zero. */&lt;BR /&gt; (void)memset(pConfig, 0, sizeof(*pConfig));&lt;/P&gt;&lt;P&gt;/* Initialize FlexCAN Module config struct with default value. */&lt;BR /&gt; pConfig-&amp;gt;clkSrc = kFLEXCAN_ClkSrc0;&lt;BR /&gt; &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;pConfig-&amp;gt;baudRate = 250000U;//1000000U;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106723i8596966184900406/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106593i4DC8F1B5D33BD1F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also attach my modified project for your desired 250khz, it works Ok now.&lt;/P&gt;&lt;P&gt;Also provide the oscilloscope 250Kbps wave:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106799i2DF868268B970C23/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bit rate is correct!&lt;/P&gt;&lt;P&gt;&amp;nbsp; Test platform: FRDM-KV11Z&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have questions about it, please kindly let me know.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Kerry&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2020 07:00:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068462#M57228</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2020-05-13T07:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong baudrate flexcan demo "interrupt transfer" on FRDM-KV11Z SDK 2.7.0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068463#M57229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Kerry. It works!&lt;/P&gt;&lt;P&gt;Really valuable, I was stuck for a while.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevertheless I have difficulties understanding how I might had found the same values that you got following this step by step example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106378i2BCE5EEB27B6CBDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's assume Baurate is 250Kbps and MCU clock is 10MHz&lt;BR /&gt;NBT x Prescaler = 40 (NBT = 8, Prescaler = 5)&lt;BR /&gt;Let's assume PROP_SEG is 1 because the CAN bus is really short.&lt;BR /&gt;NBT - 1Tq - PROP_SEG = 6&lt;BR /&gt;So PHASE_SEG1 and PHASE_SEG2 = 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know how do you get &lt;BR /&gt;#define PSEG1 4&lt;BR /&gt;#define PSEG2 1&lt;BR /&gt;#define PROPSEG 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain your calculation please ?&lt;/P&gt;&lt;P&gt;Moreover in your previous post, baudrate 250K or 1M do not have any impact on PSEG1, PSEG2 or PROPSEG.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2020 13:15:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068463#M57229</guid>
      <dc:creator>robertoquilez</dc:creator>
      <dc:date>2020-05-13T13:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong baudrate flexcan demo "interrupt transfer" on FRDM-KV11Z SDK 2.7.0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068464#M57230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="289632" data-username="robertoquilez" href="https://community.nxp.com/people/robertoquilez" style="color: #3d9ce7; background-color: #ffffff; border: 0px; font-weight: 200; text-decoration: underline; font-size: 1.286rem;"&gt;Roberto Quilez&lt;/A&gt;，&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Please read the KV11Z reference manual:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/webapp/Download?colCode=KV11P64M75RM" title="https://www.nxp.com/webapp/Download?colCode=KV11P64M75RM"&gt;https://www.nxp.com/webapp/Download?colCode=KV11P64M75RM&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Chapter&amp;nbsp; 39.4.8.4 Protocol timing&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106680i9AC41067FDD77274/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106754iFAFED49D5F28C57F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106724iA3DB25FFCB87B498/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You will find my configuration details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;1. 1Mbps, my configuration is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;#define PSEG1 4&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;#define PSEG2 1&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;#define PROPSEG 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Please note, Time segment 1= PSEG1+1, Time Segment 2= PSEG2+1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;So, if you want to get 1Mbps, but your fCANCLK is external crystal 10Mhz.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;What does it mean?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;1Mbps= (10M/(PRESDIV+1))/(4+&lt;SPAN&gt;PROPSEG+PROPSEG+PSEG1&lt;/SPAN&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;If choose PRESDIV =0, no divide clock.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;Then it means your&amp;nbsp;&lt;SPAN&gt;4+&lt;/SPAN&gt;&lt;SPAN&gt;PROPSEG+PROPSEG+PSEG1= 10, then you need to check table 39-14, find item 1 is the proper one.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;SPAN&gt;That's why I choose:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;#define PSEG1 4&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;#define PSEG2 1&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;#define PROPSEG 1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;2. 250Kbps&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&amp;nbsp; Now, why I don't modify the PSEG1, PSEG2, PROPSEG1?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&amp;nbsp;Because my PRESDIV set the other data, if you debug the code and check the&amp;nbsp;CAN_CTRL1[PRESDIV], you will find it is 3.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;250Kbps=(10M/(PRESDIV+1))/(4+&lt;SPAN&gt;PROPSEG+PROPSEG+PSEG1&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;SPAN&gt;=&amp;gt;250Kbps=&lt;SPAN style="background-color: #ffffff;"&gt;(10M/(PRESDIV(3)+1))/(4+&lt;/SPAN&gt;&lt;SPAN&gt;PROPSEG+PROPSEG+PSEG1&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Wish it helps you!&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;If you still have questions about it, please kindly let me know.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Kerry&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2020 02:37:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068464#M57230</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2020-05-14T02:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong baudrate flexcan demo "interrupt transfer" on FRDM-KV11Z SDK 2.7.0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068465#M57231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kerry, thank you again for your rapide response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think there are some things in your post that do not match with what I see in the doct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You wrote Time Segment 1 = PSEG1 + 1 but according to the reference manual it's PROPSEG + PSEG1 + 2&lt;BR /&gt;after you wrote (4+PROPSEG+PROPSEG+PSEG1) but I think you meant (4+PROPSEG+PSEG2+PSEG1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the formula:&lt;BR /&gt;4+PROPSEG+PSEG2+PSEG1 = 10 &lt;BR /&gt;==&amp;gt; TS1 + TS2 = 9&lt;/P&gt;&lt;P&gt;How do you choose between line 1 or 2 of Table 39-14 ?&lt;BR /&gt;I mean TS1(7) + TS2(2) = TS1(6) + TS2(3) = 9&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2020 12:59:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068465#M57231</guid>
      <dc:creator>robertoquilez</dc:creator>
      <dc:date>2020-05-14T12:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong baudrate flexcan demo "interrupt transfer" on FRDM-KV11Z SDK 2.7.0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068466#M57232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="289632" data-username="robertoquilez" href="https://community.nxp.com/people/robertoquilez" style="color: #3d9ce7; background-color: #ffffff; border: 0px; font-weight: 200; text-decoration: underline; font-size: 1.286rem;"&gt;Roberto Quilez&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Your understanding is wrong, seems you didn't check my picture which is from the KV11 RM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/107269iCEEBFA98C956F031/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bit time after clock divide is : SYNC_SEG+PROPSEG+PSEG1+2+PSEG2+1.&lt;/P&gt;&lt;P&gt;&amp;nbsp; SYNC_SEG=1.&lt;/P&gt;&lt;P&gt;Then, you will know it is 4+&lt;SPAN&gt;PROPSEG+PSEG1+PSEG2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please note&amp;nbsp;PROPSEG,PSEG1,&lt;SPAN&gt;PSEG2 are the register value.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;Time segment 1= PSEG1+1, Time Segment 2= PSEG2+1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;The following picture is after +1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/107366i7AD17944F051ECE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;So&amp;nbsp;4+PROPSEG+PSEG2+PSEG1 = 10, it is 1+(Time segment 1=PSEG1+1)+(Time segment2=PSEG2+1)+(jump width=PSEG1 +1)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;If&amp;nbsp; PROPSEG=1 ,jump width=2, I want&amp;nbsp;PSEG2+PSEG1+2 =&amp;nbsp;7, it is&amp;nbsp;Time segment 1+&amp;nbsp;Time segment2=7.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;So, if Time segment1 =5, Timesegment 2=2, it is 7, meet the demand.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;Wish it really helps you to understand it.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;Maybe you also need to double read the KV11 RM carefully.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;If you still have questions about it, please kindly let me know.&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;Kerry&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px; font-size: 14px;"&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2020 02:34:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068466#M57232</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2020-05-15T02:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong baudrate flexcan demo "interrupt transfer" on FRDM-KV11Z SDK 2.7.0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068467#M57233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, you are right, thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My misunderstanding was due to the first picture where we see:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Timer&amp;nbsp;segment 1 = PROPSEG + PSEG1 + 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the formula to apply is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Time segment 1= PSEG1+1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thank you very much for your support, again.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2020 07:55:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Wrong-baudrate-flexcan-demo-quot-interrupt-transfer-quot-on-FRDM/m-p/1068467#M57233</guid>
      <dc:creator>robertoquilez</dc:creator>
      <dc:date>2020-05-15T07:55:09Z</dc:date>
    </item>
  </channel>
</rss>

