<?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>S32KのトピックRe: S32K1: LPUART BAUD register OSR bits stuck</title>
    <link>https://community.nxp.com/t5/S32K/S32K1-LPUART-BAUD-register-OSR-bits-stuck/m-p/2198174#M54108</link>
    <description>&lt;P&gt;Hi Trevor,&lt;/P&gt;
&lt;P&gt;Thank you for your information.&lt;/P&gt;
&lt;P&gt;I hadn't noticed before that you can't clear the &lt;STRONG&gt;OSR&lt;/STRONG&gt; bit separately; I saw that writing to the &lt;STRONG&gt;BAUD&lt;/STRONG&gt; register in the RTD is also done all at once.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Robin&lt;/P&gt;</description>
    <pubDate>Tue, 04 Nov 2025 09:11:09 GMT</pubDate>
    <dc:creator>Robin_Shen</dc:creator>
    <dc:date>2025-11-04T09:11:09Z</dc:date>
    <item>
      <title>S32K1: LPUART BAUD register OSR bits stuck</title>
      <link>https://community.nxp.com/t5/S32K/S32K1-LPUART-BAUD-register-OSR-bits-stuck/m-p/2196889#M54046</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;My target MCU is a S32K144W on the&amp;nbsp;S32K14W-Q064 evaluation board. I'm configuring the LPUART0 baud rate and I'm noticing that I cannot clear the lower 4 OSR bits in the BAUD register. Those bits default to 1 on reset, but should be writable/clearable afterward. I can set or clear the upper OSR bit, but the lower 4 bits are stuck, always set, and can't be cleared through any operation on that register.&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_RM_BAUD_OSR.png" style="width: 867px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/363561i29FF63DC8D44B888/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_RM_BAUD_OSR.png" alt="Screenshot_RM_BAUD_OSR.png" /&gt;&lt;/span&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;Obviously that limits the function of the UART, and makes choosing an appropriate baud rate difficult. I have combed through the documentation several times but I can't find any mention of a restriction on these bits, or a condition that must be satisfied for them to be cleared or changed. Perhaps I missed it.&lt;/P&gt;&lt;P&gt;I found 2 other forum posts where a user mentions the same problem (though on a different part).&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"So i noticed that&amp;nbsp;only&amp;nbsp; value of 16 and 32 can be set in OSR field (15 and 31), any other value results in getting 16/32."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I don't see a resolution.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K82F-uart-problem/m-p/845950" target="_blank"&gt;https://community.nxp.com/t5/Kinetis-Microcontrollers/FRDM-K82F-uart-problem/m-p/845950&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-baudrate/m-p/792047/highlight/true#M48190" target="_blank"&gt;https://community.nxp.com/t5/Kinetis-Microcontrollers/LPUART0-baudrate/m-p/792047/highlight/true#M48190&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on why these bits are stuck or how I can change them?&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Trevor&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 22:34:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K1-LPUART-BAUD-register-OSR-bits-stuck/m-p/2196889#M54046</guid>
      <dc:creator>trevor_oth</dc:creator>
      <dc:date>2025-10-31T22:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: S32K1: LPUART BAUD register OSR bits stuck</title>
      <link>https://community.nxp.com/t5/S32K/S32K1-LPUART-BAUD-register-OSR-bits-stuck/m-p/2197389#M54066</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Did you configure BAUD[BOTHEDGE]? If you are using S32K1 RTD, then you may need to configure it by refer to:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BAUD[OSR][BOTHEDGE] Lpuart_Uart_Ip_SetUp_Baudrate RTD.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/363686i9942927B0D23248A/image-size/large?v=v2&amp;amp;px=999" role="button" title="BAUD[OSR][BOTHEDGE] Lpuart_Uart_Ip_SetUp_Baudrate RTD.png" alt="BAUD[OSR][BOTHEDGE] Lpuart_Uart_Ip_SetUp_Baudrate RTD.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Robin&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!&lt;/P&gt;
&lt;P&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;</description>
      <pubDate>Mon, 03 Nov 2025 09:11:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K1-LPUART-BAUD-register-OSR-bits-stuck/m-p/2197389#M54066</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2025-11-03T09:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: S32K1: LPUART BAUD register OSR bits stuck</title>
      <link>https://community.nxp.com/t5/S32K/S32K1-LPUART-BAUD-register-OSR-bits-stuck/m-p/2197729#M54080</link>
      <description>&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;I'm not using S32K1 RTD - I'm configuring the UART directly in the LPUART registers.&lt;/P&gt;&lt;P&gt;To clarify, I was trying clear the OSR and SBR bits first (using LPUART_BAUD_OSR_MASK and LPUART_BAUD_SBR_MASK), then set the required bits (using LPUART_BAUD_OSR(x) and LPUART_BAUD_SBR(x)) to get the baud rate that I need. The key is that if you clear all of the OSR bits, it will result in an oversampling ratio of 16, which is the same as the default with the lower 4 bits set. The reference manual says this, but doesn't appear to fully explain what happens when you clear the OSR bits.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_RM_OSR.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/363762iCF10A95BC2C7762C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot_RM_OSR.png" alt="Screenshot_RM_OSR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What I didn't understand was that if you clear all of the OSR bits, the hardware doesn't just interpret that as using an oversample ratio of 16, but instead it literally forces the 4 lower bits back to 1, back to the default setting. So you can't use the typical pattern of masking and clearing those bits first, then setting the bits you need. Instead you have to set the BAUD register all it once with the values that you need in all of the bit groups.&lt;/P&gt;&lt;P&gt;So by changing this:&lt;BR /&gt;IP_LPUART0-&amp;gt;BAUD &amp;amp;= ~( LPUART_BAUD_OSR_MASK );&lt;BR /&gt;IP_LPUART0-&amp;gt;BAUD &lt;STRONG&gt;|=&lt;/STRONG&gt; ( LPUART_BAUD_OSR(10u) );&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;To this:&lt;BR /&gt;IP_LPUART0-&amp;gt;BAUD &lt;STRONG&gt;=&lt;/STRONG&gt; ( LPUART_BAUD_OSR(10u) | ... );&lt;/P&gt;&lt;P&gt;It looks like it is now working as expected.&lt;/P&gt;&lt;P&gt;Thanks again for your help.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Trevor&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2025 21:39:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K1-LPUART-BAUD-register-OSR-bits-stuck/m-p/2197729#M54080</guid>
      <dc:creator>trevor_oth</dc:creator>
      <dc:date>2025-11-03T21:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: S32K1: LPUART BAUD register OSR bits stuck</title>
      <link>https://community.nxp.com/t5/S32K/S32K1-LPUART-BAUD-register-OSR-bits-stuck/m-p/2198174#M54108</link>
      <description>&lt;P&gt;Hi Trevor,&lt;/P&gt;
&lt;P&gt;Thank you for your information.&lt;/P&gt;
&lt;P&gt;I hadn't noticed before that you can't clear the &lt;STRONG&gt;OSR&lt;/STRONG&gt; bit separately; I saw that writing to the &lt;STRONG&gt;BAUD&lt;/STRONG&gt; register in the RTD is also done all at once.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Robin&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 09:11:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K1-LPUART-BAUD-register-OSR-bits-stuck/m-p/2198174#M54108</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2025-11-04T09:11:09Z</dc:date>
    </item>
  </channel>
</rss>

