<?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>8-bit MicrocontrollersのトピックHelp me please init mscan on dz32 tja1042 125kbps</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-me-please-init-mscan-on-dz32-tja1042-125kbps/m-p/850610#M22702</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. I am trying to add CAN support for my project on s9s08dz32. First code isnt mine.. So i having some troubles. I founded an excel table to calculate mscan registers. MC worked without external osc.&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/76551iA15A6412DB9F91FE/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;&lt;BR /&gt;// Declare 'define' constants&lt;BR /&gt;#define FTrim_Val 0 //Part 64-2 ftrim value for 24 MHz&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#define ICSC1_FEI 0x04&lt;BR /&gt;#define ICSC2_FEI 0x00&lt;BR /&gt;#define ICSSC_FEI FTrim_Val // 0x80 | FTrim_Val&lt;BR /&gt;#define FEI_Speed 24000000&lt;BR /&gt;#define hi_baud 115000&lt;BR /&gt;#define fei_baud FEI_Speed/16/hi_baud&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Selects FEI mode&lt;BR /&gt; // Sets trimming for fBUS about 25 MHz&lt;BR /&gt; ICS_FEI();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma INLINE&lt;BR /&gt;void ICS_FEI() {&lt;/P&gt;&lt;P&gt;#define NVICSTRM_US (*(byte *)0xFFAF)&lt;BR /&gt;&lt;BR /&gt; if (NVICSTRM_US != 0xFF)&lt;BR /&gt; MCGTRM = NVICSTRM_US; // load trim value if NV location not blank&lt;BR /&gt; else&lt;BR /&gt; MCGTRM = 0xAD; // use a default value if NVICSTRM is blank&lt;BR /&gt; MCGC1 = ICSC1_FEI;&lt;BR /&gt; MCGC2 = ICSC2_FEI;&lt;BR /&gt; MCGSC = ICSSC_FEI;&lt;BR /&gt; while (MCGC1_CLKS != MCGSC_CLKST) {} // wait for clk state to match clk select&lt;BR /&gt;} //end InitICG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is code to init FEI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is am right that fbus is 24mhz?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In picture my calculations of mscan register with 125kbps and tja1042.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help me please what i need to change in mscan.h or mscan.c to use extended identifiers with baudrate 125kbps&lt;/P&gt;&lt;P&gt;Thanx in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Nov 2018 07:15:36 GMT</pubDate>
    <dc:creator>punxer</dc:creator>
    <dc:date>2018-11-20T07:15:36Z</dc:date>
    <item>
      <title>Help me please init mscan on dz32 tja1042 125kbps</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-me-please-init-mscan-on-dz32-tja1042-125kbps/m-p/850610#M22702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. I am trying to add CAN support for my project on s9s08dz32. First code isnt mine.. So i having some troubles. I founded an excel table to calculate mscan registers. MC worked without external osc.&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/76551iA15A6412DB9F91FE/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;&lt;BR /&gt;// Declare 'define' constants&lt;BR /&gt;#define FTrim_Val 0 //Part 64-2 ftrim value for 24 MHz&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#define ICSC1_FEI 0x04&lt;BR /&gt;#define ICSC2_FEI 0x00&lt;BR /&gt;#define ICSSC_FEI FTrim_Val // 0x80 | FTrim_Val&lt;BR /&gt;#define FEI_Speed 24000000&lt;BR /&gt;#define hi_baud 115000&lt;BR /&gt;#define fei_baud FEI_Speed/16/hi_baud&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Selects FEI mode&lt;BR /&gt; // Sets trimming for fBUS about 25 MHz&lt;BR /&gt; ICS_FEI();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma INLINE&lt;BR /&gt;void ICS_FEI() {&lt;/P&gt;&lt;P&gt;#define NVICSTRM_US (*(byte *)0xFFAF)&lt;BR /&gt;&lt;BR /&gt; if (NVICSTRM_US != 0xFF)&lt;BR /&gt; MCGTRM = NVICSTRM_US; // load trim value if NV location not blank&lt;BR /&gt; else&lt;BR /&gt; MCGTRM = 0xAD; // use a default value if NVICSTRM is blank&lt;BR /&gt; MCGC1 = ICSC1_FEI;&lt;BR /&gt; MCGC2 = ICSC2_FEI;&lt;BR /&gt; MCGSC = ICSSC_FEI;&lt;BR /&gt; while (MCGC1_CLKS != MCGSC_CLKST) {} // wait for clk state to match clk select&lt;BR /&gt;} //end InitICG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is code to init FEI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is am right that fbus is 24mhz?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In picture my calculations of mscan register with 125kbps and tja1042.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help me please what i need to change in mscan.h or mscan.c to use extended identifiers with baudrate 125kbps&lt;/P&gt;&lt;P&gt;Thanx in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2018 07:15:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-me-please-init-mscan-on-dz32-tja1042-125kbps/m-p/850610#M22702</guid>
      <dc:creator>punxer</dc:creator>
      <dc:date>2018-11-20T07:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help me please init mscan on dz32 tja1042 125kbps</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-me-please-init-mscan-on-dz32-tja1042-125kbps/m-p/850611#M22703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ure really useless community&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2018 12:16:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Help-me-please-init-mscan-on-dz32-tja1042-125kbps/m-p/850611#M22703</guid>
      <dc:creator>punxer</dc:creator>
      <dc:date>2018-12-21T12:16:56Z</dc:date>
    </item>
  </channel>
</rss>

