<?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>LPC Microcontrollers中的主题 Re: IOCON (bits that is Reserved. Read value is undefined, only zero should be written.)</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1455007#M48703</link>
    <description>&lt;P&gt;I see, thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 09 May 2022 13:32:38 GMT</pubDate>
    <dc:creator>Seif1</dc:creator>
    <dc:date>2022-05-09T13:32:38Z</dc:date>
    <item>
      <title>IOCON (bits that is Reserved. Read value is undefined, only zero should be written.)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1452439#M48637</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, I have a simple question. giving that only 0&amp;nbsp; can be written in bit number 6 and 12to 31, and reading value is undefined. So to set the function value to 0001 I cannot write&lt;/P&gt;&lt;P&gt;IOCON-&amp;gt;PIO[0][0]= (IOCON-&amp;gt;PIO[0][0] &amp;amp; (~(0b1111))) |0001 .&lt;/P&gt;&lt;P&gt;the reason for that when I read bit number 6 or 12 to 31 there is a chance that on of these bits will return .1 so in this case I write 1 to the bit that returned 1 instead of 0 which is not right. instead I need to have a mask that will always clear bit number 6 and 12 to 31.&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IOCON-&amp;gt;PIO[0][0]= (IOCON-&amp;gt;PIO[0][0] &amp;amp;&amp;nbsp; 0b101110110000)|&amp;nbsp;0001&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;in case of type I the mask that will always clear bit 12 to 31. in case of type A&amp;nbsp; the mask will always clear bit 6, 10, 12 to 31.&lt;/P&gt;&lt;P&gt;and giving that each type are different, the mask that will be used to set the Function for the pin will be different based on the pin type D,I, or A.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Seif1_0-1651614084969.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/178706iD3914E617564F4EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Seif1_0-1651614084969.png" alt="Seif1_0-1651614084969.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Seif1_1-1651615567208.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/178707i31312EA0CAB3AA79/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Seif1_1-1651615567208.png" alt="Seif1_1-1651615567208.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Seif1_2-1651616009045.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/178708iE3737AF8C97D6091/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Seif1_2-1651616009045.png" alt="Seif1_2-1651616009045.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;AM I right?? or should I not put that much concern, that reading bits such as bit 6 in type D can return undefined value(so it could be 1)?&amp;nbsp; thanks very much in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 13:46:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1452439#M48637</guid>
      <dc:creator>Seif1</dc:creator>
      <dc:date>2022-05-04T13:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: IOCON (bits that is Reserved. Read value is undefined, only zero should be written.)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1452740#M48646</link>
      <description>&lt;P&gt;Hi, I would like to take your opinion&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/137574"&gt;@frank_m&lt;/a&gt;&amp;nbsp;. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 13:48:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1452740#M48646</guid>
      <dc:creator>Seif1</dc:creator>
      <dc:date>2022-05-04T13:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: IOCON (bits that is Reserved. Read value is undefined, only zero should be written.)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1452770#M48648</link>
      <description>&lt;P&gt;I wouldn't speculate. If bits are documented as "reserved", I would avoid writing any other value as specified to them.&lt;/P&gt;&lt;P&gt;Those "registers" are just the interface according to the documented programming model, you don't know what is actually behind it (i.e. on the silicon). Might be just register bits, or but might be peripheral gates that affect the unit immediately.&lt;/P&gt;&lt;P&gt;And, later MCUs might make use of reserved bits, giving you portability issues.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 14:24:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1452770#M48648</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2022-05-04T14:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: IOCON (bits that is Reserved. Read value is undefined, only zero should be written.)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1454258#M48683</link>
      <description>&lt;P&gt;Hi, Thanks for your response and I agree with you. However, in the SDK I saw the following&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Seif1_0-1651844053239.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/179054i93C53902D1230F3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Seif1_0-1651844053239.png" alt="Seif1_0-1651844053239.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;so pin 1 in GPIO 1 is D typed&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Seif1_2-1651844176982.png" style="width: 681px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/179056i0CF92EA161B86F13/image-dimensions/681x347?v=v2" width="681" height="347" role="button" title="Seif1_2-1651844176982.png" alt="Seif1_2-1651844176982.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so IOCON type D says that reading bit number 6 and 12 to 31 is undefined (could be 0 or 1?).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;so&amp;nbsp; the following part of the code&lt;/STRONG&gt; will be clearing the bits that is related to func_MASK and DIGIMODE_mask(first four bits and bit number &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; and read the rest of the register bits value and leave it the same. this include reading bit 6, and 12 to 31( which could have a value of 1 becuse reading these bits is undefined).&amp;nbsp;&lt;/P&gt;&lt;P&gt;((IOCON-&amp;gt;PIO[1][1] &amp;amp;&lt;BR /&gt;/* Mask bits to zero which are setting */&lt;BR /&gt;(~(IOCON_PIO_FUNC_MASK | IOCON_PIO_DIGIMODE_MASK)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after making or with the desired value for FUNC and&amp;nbsp;DIGIMODE this new value will be writing to the&amp;nbsp;&lt;/P&gt;&lt;P&gt;IOCON-&amp;gt;PIO[1][1]&lt;/P&gt;&lt;P&gt;which include the read value for pin6, 12 to 31&lt;/P&gt;&lt;P&gt;my question what if any of the value we read for pin 6, 12 to 31 was 1(because the reading value is undefined). in this case we wrote 1 in bit 6, or 12 to31. and we should only write zero to theses bits according to data sheet.&lt;/P&gt;&lt;P&gt;is this a mistake in SDK, or in datasheet? or did I miss something?&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 13:53:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1454258#M48683</guid>
      <dc:creator>Seif1</dc:creator>
      <dc:date>2022-05-06T13:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: IOCON (bits that is Reserved. Read value is undefined, only zero should be written.)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1454749#M48694</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; my question what if any of the value we read for pin 6, 12 to 31 was 1(because the reading value is undefined). in this case we wrote 1 in bit 6, or 12 to31. and we should only write zero to theses bits according to data sheet.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt; is this a mistake in SDK, or in datasheet? or did I miss something?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Vendor-supplied examples often assume a "sunny-day scenario", i.e. bravely skip most error checking, or ignore such undefined values. Level of testing is often minimal.&lt;/P&gt;&lt;P&gt;Thus, probably more or less "lazy coding".&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 06:22:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1454749#M48694</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2022-05-09T06:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: IOCON (bits that is Reserved. Read value is undefined, only zero should be written.)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1455007#M48703</link>
      <description>&lt;P&gt;I see, thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 13:32:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IOCON-bits-that-is-Reserved-Read-value-is-undefined-only-zero/m-p/1455007#M48703</guid>
      <dc:creator>Seif1</dc:creator>
      <dc:date>2022-05-09T13:32:38Z</dc:date>
    </item>
  </channel>
</rss>

