<?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のトピックRe: LC60: SCI / Generating 1 second pulse for calibration</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175237#M12173</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I didn't check how it is for the LC60, but on the S08DZ the SCI transmitter will start by sending a full idle character when it is enabled by writing TE to 1. This means that you will get the starbit a character's time later.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Sten&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jan 2008 14:42:12 GMT</pubDate>
    <dc:creator>Sten</dc:creator>
    <dc:date>2008-01-08T14:42:12Z</dc:date>
    <item>
      <title>LC60: SCI / Generating 1 second pulse for calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175232#M12168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm tring to generate accurate two falling egdes that&amp;nbsp;have 1 second between them. MCU is in FBE mode and fbus=16,384 Hz. I have set baud rate divider to 128 at this bus frequency and send data binary 1 over SCI1. The data sent over TX pin has signal exatcly that I want. There is no problem on there. But eith the code below, RS485 line is disabled about 5.25sec later. Sending operation is not starting immediately I write to SCID register. The function should be completed with in about 1.25second.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;void test(void){&amp;nbsp;&amp;nbsp;&amp;nbsp; DisableInterrupts;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 8 data, 1 stop, no parity&amp;nbsp;&amp;nbsp;&amp;nbsp; SCIC1 = 0; SCIC2 = 0; SCIC3 = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCIBD = 128;&amp;nbsp; // set baud to 8&amp;nbsp;&amp;nbsp;&amp;nbsp; SCIC3_TXINV = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCIC2_TE = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __RESET_WATCHDOG();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICGC2 = 8; // Generate a reset request on loss of clock.&amp;nbsp;&amp;nbsp;&amp;nbsp; ICGC1 = 0b00110100;&amp;nbsp;&amp;nbsp; // FBE mode, fbus=16,384 Hz, clock monitor enabled&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(ICGS1_CLKST != FBE) __RESET_WATCHDOG();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RS485_TX_EN(); // set TXCS pin&amp;nbsp;&amp;nbsp;&amp;nbsp; SCID = 1; // send a two falling edges have period one second over TX pin&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!SCIS1_TC) __RESET_WATCHDOG();&amp;nbsp;&amp;nbsp;&amp;nbsp; RS485_TX_DIS(); // clear TXCS pin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm("dcb 0x8D"); // reset the mcu&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;nbsp;See the gif file for the output of the function.&lt;/DIV&gt;&lt;DIV&gt;10x&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by BasePointer on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2007-12-27&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;10:13 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:23:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175232#M12168</guid>
      <dc:creator>BasePointer</dc:creator>
      <dc:date>2020-10-29T09:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: SCI / Generating 1 second pulse for calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175233#M12169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;Yes your code looks OK.&lt;/DIV&gt;&lt;DIV&gt;But you wanted to remove the time from the&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RS485_TX_EN(); // set TXCS pin&lt;BR /&gt;&lt;BR /&gt;to the code output.&lt;/DIV&gt;&lt;DIV&gt;I am not an expert on RS485, but the routine seems to be waiting&amp;nbsp;for the TC flag.&lt;/DIV&gt;&lt;DIV&gt;In the 9S08LC manual it says:&lt;/DIV&gt;&lt;DIV&gt;&lt;B&gt;&lt;FONT size="3"&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;P align="left"&gt;&lt;B&gt;&lt;FONT size="3"&gt;Transmission Complete Flag&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;— TC is set out of reset and when TDRE = 1 and no data, preamble, or break&lt;/FONT&gt;&lt;/FONT&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;character is being transmitted.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;0 Transmitter active (sending data, a preamble, or a break).&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;1 Transmitter idle (transmission activity complete).&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;TC is cleared automatically by reading SCIS1 with TC = 1 and then doing one of the following three things:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;• Write to the SCI data register (SCID) to transmit new data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;• Queue a preamble by changing TE from 0 to 1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;• Queue a break character by writing 1 to SBK in SCIC2&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;Isn't the routine sending a break character, which is what is seen on the oscilloscope?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;If you change the&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RS485_TX_EN(); // set TXCS pin&lt;BR /&gt;&lt;BR /&gt;to&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;&amp;nbsp; for (;SCIS1_TC == 0&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;and check what happens.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;Regards,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&lt;FONT face="Arial" size="3"&gt;Ake&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Helvetica" size="1"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2008 22:51:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175233#M12169</guid>
      <dc:creator>Ake</dc:creator>
      <dc:date>2008-01-03T22:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: SCI / Generating 1 second pulse for calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175234#M12170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi Ake,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you for the response. I think I need to be more clear:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Here is my TX_EN, DIS macros, they just set port pin&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;Code:&lt;PRE&gt;#define RS485_TX_DIS()  {PTBD_PTBD3 = 0; PTBDD_PTBDD3 = 1;}#define RS485_TX_EN()   {PTBD_PTBD3 = 1; PTBDD_PTBDD3 = 1;}&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you look at my test code, I'm sending data immediately RS485_TX_EN() macro:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;Code:&lt;PRE&gt;    RS485_TX_EN(); // set TXCS pin    SCID = 1; // send a two falling edges have period one second over TX pin&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;But according to this, if you look at attached &lt;STRONG&gt;SCI1_Startup_Time.gif&lt;/STRONG&gt;, you will see it start sending data 1.365sec later after set TX_EN pin. It seems SCI module problem to me. It send two bytes after initializing SCI module first. But I'm not sure. Scope time base is 500ms/div&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;An other interesting note that, the sci module only work with this code in BDM mode. If I unplug the&amp;nbsp;BDM socket end reset the MCU, it generates different TXCS form (so fast) and no TX output.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;10x&lt;/DIV&gt;&lt;DIV&gt;BP.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:23:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175234#M12170</guid>
      <dc:creator>BasePointer</dc:creator>
      <dc:date>2020-10-29T09:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: SCI / Generating 1 second pulse for calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175235#M12171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I think you should read SCIxS1 register before writing to SCIxD. It's a standard sequence to clear TC and TDRE flags and start a transmission: 1) read status with TDRE set, 2) write data.&amp;nbsp;It was&amp;nbsp;common for many MOT/FSL MCUs for many years. HC11, HC12, S12,S12X etc all do require to read status and only then write data register in order to Tx. Without reading status register I wouldn't expect any activity on Tx. I don't find it surprising your code doesn't send anything in normal mode.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Jan 2008 17:32:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175235#M12171</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-01-05T17:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: SCI / Generating 1 second pulse for calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175236#M12172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi kef,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for your suggestion. Doesn't the code below do that it reads SCIS1 and clears TC flag if it is set? Do I need to read entire status register?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;Code:&lt;PRE&gt;while(!SCIS1_TC) __RESET_WATCHDOG();&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;I also added line such as "dummy = SCIS1;" but the result was being same.&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;10x&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:23:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175236#M12172</guid>
      <dc:creator>BasePointer</dc:creator>
      <dc:date>2020-10-29T09:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: SCI / Generating 1 second pulse for calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175237#M12173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I didn't check how it is for the LC60, but on the S08DZ the SCI transmitter will start by sending a full idle character when it is enabled by writing TE to 1. This means that you will get the starbit a character's time later.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Sten&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2008 14:42:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175237#M12173</guid>
      <dc:creator>Sten</dc:creator>
      <dc:date>2008-01-08T14:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: SCI / Generating 1 second pulse for calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175238#M12174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;FONT face="Arial" size="1"&gt;&lt;/FONT&gt;&lt;P align="left"&gt;&lt;FONT face="Arial" size="1"&gt;Sten must be&amp;nbsp;right. From LC60 SCI module docs:&lt;/FONT&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P align="left"&gt;TE also can be used to queue an idle character by writing TE = 0 then TE = 1 while a transmission is in progress.Refer to &lt;FONT color="#474386" face="Arial" size="1"&gt;Section 12.3.2.1, “Send Break and Queued Idle&lt;/FONT&gt;&lt;FONT face="Arial" size="1"&gt;,” for more details&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P align="left"&gt;&lt;FONT face="Arial" size="1"&gt;S12X SCI behaves exactly the same, though TE bit isn't documented equally well. It's interesting what transmission is in progress when we set TE=1 for the first time :smileyhappy:, but it seems that any TE rising edge makes SCI sending idle character.&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Arial" size="1"&gt;BasePointer, regarding reading SCIS1. Your while(!SCIS1_TC) is OK for reading SCIS1 register, but it comes after you first time write to SCID register. Maybe you read it somewhere earlier then in the test() routine?&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT size="1"&gt;[SCID=?]&amp;nbsp;&amp;nbsp; followed by&amp;nbsp;&amp;nbsp; [&lt;/FONT&gt;&lt;FONT size="1"&gt;while( !SCIS1_TC) ;]&amp;nbsp; should be OK, provided you read SCIS1 with SCIS1_TDRE set at least once before. You should clear TDRE before writing to SCID, and the only way to do that is reading TDRE==1 and writing then SCID. You say the result is the same if you read SCIS1 before SCID or not. You also said previously that you see no TX output with BDM not connected. Did you recheck if you see&amp;nbsp;now TX output with no BDM connected?&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT size="1"&gt;Regarding unwanted idle character and delay between TXCS and TX. After writing TE=1, you should delay setting TXCS for idle character time. Try 1) setting baudrate divider to min value of 1, 2) enabling TE=1, 3) waiting for full character time at fastest baudrate, 4) setting baudrate&amp;nbsp;divider to value you want (128). At least this works on S12XD.&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2008 17:58:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175238#M12174</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-01-08T17:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: LC60: SCI / Generating 1 second pulse for calibration</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175239#M12175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi kef and Sten,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I added while(!SCIS1_TDRE) after set the TE bit. And SCI start working both in active background mode or not.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For the Idle character, I first set baudrate divider to 1 like suggested, and wait about 15ms after set MCU to FBE mode. Now the result is acceptable. Solved.gif.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;void test(void){    DisableInterrupts;        // 8 data, 1 stop, no parity    SCIC1 = 0; SCIC2 = 0; SCIC3 = 0;            SCIBD = 1;  // set baud to 1024    SCIC3_TXINV = 1;    SCIC2_TE = 1;    while(!SCIS1_TDRE) __RESET_WATCHDOG(); // added with kef's warning        ICGC2 = 8; // Generate a reset request on loss of clock.    ICGC1 = 0b00110100;   // FBE mode, fbus=16,384 Hz, clock monitor enabled    while(ICGS1_CLKST != FBE) __RESET_WATCHDOG();        Delay20uS(1); // it waits about 15ms at that bus freq        SCIBD = 128;  // set baud to 8            RS485_TX_EN(); // set TXCS pin          SCID = 1;      while(!SCIS1_TC) __RESET_WATCHDOG();        RS485_TX_DIS(); // clear TXCS pin        asm("dcb 0x8D"); // reset the mcu   }&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;10x for the helps.&lt;/DIV&gt;&lt;DIV&gt;BP.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by BasePointer on &lt;SPAN class="date_text"&gt;2008-01-08&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:50 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:23:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/LC60-SCI-Generating-1-second-pulse-for-calibration/m-p/175239#M12175</guid>
      <dc:creator>BasePointer</dc:creator>
      <dc:date>2020-10-29T09:23:53Z</dc:date>
    </item>
  </channel>
</rss>

