<?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: GPIO behaviour registers in mc9s12xs128 in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/GPIO-behaviour-registers-in-mc9s12xs128/m-p/863797#M7403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="314964" data-username="carleslloret" href="https://community.nxp.com/people/carleslloret"&gt;carles lloret&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-"By typing and defining as such "PORT_H_PIE BIN2BYTE(00000000) ", is it enough to define or change the behaviour of the GPIO in the PORT H? Is even PORT_H_PIE a key word?" -&amp;gt; If only have this define, while didn't assignment to related register, it just a&amp;nbsp; key word.&lt;/P&gt;&lt;P&gt;- I was wondering why you define these. When create a new project on CW, even if don't include Processor Expert, there is a header file "MC9S12XS128.h", it has define ports direction, input, output.... ,you can directly use.&lt;/P&gt;&lt;P&gt;- BTW, what about the exactly definition about "BIN2BYTE()" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jan 2019 03:36:08 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2019-01-14T03:36:08Z</dc:date>
    <item>
      <title>GPIO behaviour registers in mc9s12xs128</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/GPIO-behaviour-registers-in-mc9s12xs128/m-p/863796#M7402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have a question regarding codewarrior.&lt;/P&gt;&lt;P&gt;I have an inherited code, and I am wondering one thing. Is it possible to define registers like RDR, PER, PPS, PIE, PIF (registers to describe a pin... input, output, pull up, pull down) with a code? or is it necessary to use the Processor Expert?&lt;/P&gt;&lt;P&gt;Let's say I want to change the pull up-down register?&amp;nbsp; is it possible to do it by typing some code like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*--------- Port H --------------*/&lt;BR /&gt;#define PORT_H_DDR BIN2BYTE(11111111) /* Data direction 0=Input / 1=Output */&lt;BR /&gt; // ||||||||&lt;BR /&gt; // |||||||+------ bit0: NOT USED&lt;BR /&gt; // ||||||+------- bit1: NOT USED&lt;BR /&gt; // |||||+-------- bit2: NOT USED&lt;BR /&gt; // ||||+--------- bit3: NOT USED&lt;BR /&gt; // |||+---------- bit4: NOT USED&lt;BR /&gt; // ||+----------- bit5: NOT USED&lt;BR /&gt; // |+------------ bit6: NOT USED&lt;BR /&gt; // +------------- bit7: NOT USED&lt;BR /&gt;// 7-0&lt;BR /&gt;//DDRH&lt;BR /&gt;//Port H data direction—&lt;BR /&gt;//This bit determines whether the associated pin is an input or output.&lt;BR /&gt;//1 Associated pin configured as output&lt;BR /&gt;//0 Associated pin configured as input &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;#define PORT_H_RDR BIN2BYTE(00000000) /* 0x00 Reduced Drive: 0=full 1=1/3 */&lt;BR /&gt;//7-0&lt;BR /&gt;//RDRH&lt;BR /&gt;//Port H reduced drive—Select reduced drive for output pin&lt;BR /&gt;//This bit configures the drive strength of the associated output pin as either full or reduced. If a pin is used as input&lt;BR /&gt;//this bit has no effect. The reduced drive function is independent of which function is being used on a particular pin.&lt;BR /&gt;//1 Reduced drive selected (approx. 1/5 of the full drive strength)&lt;BR /&gt;//0 Full drive strength enabled &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;#define PORT_H_PER BIN2BYTE(00010000) /* Pull Devide: 0=pullup or down disable / 1=pullup or down enable */&lt;BR /&gt; // ||||||||&lt;BR /&gt; // |||||||+------ bit0: NOT USED&lt;BR /&gt; // ||||||+------- bit1: NOT USED&lt;BR /&gt; // |||||+-------- bit2: NOT USED&lt;BR /&gt; // ||||+--------- bit3: NOT USED&lt;BR /&gt; // |||+---------- bit4: NOT USED // BMS_IGN&lt;BR /&gt; // ||+----------- bit5: NOT USED&lt;BR /&gt; // |+------------ bit6: NOT USED&lt;BR /&gt; // +------------- bit7: NOT USED&lt;BR /&gt; //7-0&lt;BR /&gt;//PERH&lt;BR /&gt;//Port H pull device enable—Enable pull device on input pin&lt;BR /&gt;//This bit controls whether a pull device on the associated port input pin is active. If a pin is used as output this bit has&lt;BR /&gt;//no effect. The polarity is selected by the related polarity select register bit.&lt;BR /&gt;//1 Pull device enabled&lt;BR /&gt;//0 Pull device disabled&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;#define PORT_H_PPS BIN2BYTE(00000000) /* Polarity 0=fallin edge sets the flag (pull-up) / 1=Rising edge sets the flag (pull-Down)*/&lt;BR /&gt; // ||||||||&lt;BR /&gt; // |||||||+------ bit0: NOT USED&lt;BR /&gt; // ||||||+------- bit1: NOT USED&lt;BR /&gt; // |||||+-------- bit2: NOT USED&lt;BR /&gt; // ||||+--------- bit3: NOT USED&lt;BR /&gt; // |||+---------- bit4: NOT USED //BMS_IGN&lt;BR /&gt; // ||+----------- bit5: NOT USED&lt;BR /&gt; // |+------------ bit6: NOT USED&lt;BR /&gt; // +------------- bit7: NOT USED&lt;BR /&gt;//7-0&lt;BR /&gt;//PPSH&lt;BR /&gt;//Port H pull device select—Configure pull device and pin interrupt edge polarity on input pin&lt;BR /&gt;//This bit selects a pull-up or a pull-down device if enabled on the associated port input pin.&lt;BR /&gt;//This bit also selects the polarity of the active pin interrupt edge.&lt;BR /&gt;//1 A pull-down device selected; rising edge selected&lt;BR /&gt;//0 A pull-up device selected; falling edge selected &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;#define PORT_H_PIE BIN2BYTE(00000000) /* Interrupt Enable 0=disable 1=Enable */&lt;BR /&gt;//7-0&lt;BR /&gt;//PIEH&lt;BR /&gt;//Port H interrupt enable—&lt;BR /&gt;//This bit enables or disables on the edge sensitive pin interrupt on the associated pin.&lt;BR /&gt;//1 Interrupt enabled&lt;BR /&gt;//0 Interrupt disabled (interrupt flag masked)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;BR /&gt; #define PORT_H_PIF_MASK BIN2BYTE(00000000) /* Interrupt flag, write 1 clear the flag */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This, for example, PORT_H_PIE is a register that enables or not the interruptions in the port h. By typing and defining as such "PORT_H_PIE BIN2BYTE(00000000) ", is it enough to define or change the behaviour of the GPIO in the PORT H? Is even PORT_H_PIE a key word?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In another code I can read...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;volatile PTHSTR _PTH; /* Port H Data Register; 0x00000260 */&lt;BR /&gt;volatile PTIHSTR _PTIH; /* Port H Input Register; 0x00000261 */&lt;BR /&gt;volatile DDRHSTR _DDRH; /* Port H Data Direction Register; 0x00000262 */&lt;BR /&gt;volatile RDRHSTR _RDRH; /* Port H Reduced Drive Register; 0x00000263 */&lt;BR /&gt;volatile PERHSTR _PERH; /* Port H Pull Device Enable Register; 0x00000264 */&lt;BR /&gt;volatile PPSHSTR _PPSH; /* Port H Polarity Select Register; 0x00000265 */&lt;BR /&gt;volatile PIEHSTR _PIEH; /* Port H Interrupt Enable Register; 0x00000266 */&lt;BR /&gt;volatile PIFHSTR _PIFH; /* Port H Interrupt Flag Register; 0x00000267 */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I cannot find a relation between _DDRH and PORT_H_DDR...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2019 10:40:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/GPIO-behaviour-registers-in-mc9s12xs128/m-p/863796#M7402</guid>
      <dc:creator>carleslloret</dc:creator>
      <dc:date>2019-01-09T10:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO behaviour registers in mc9s12xs128</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/GPIO-behaviour-registers-in-mc9s12xs128/m-p/863797#M7403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="314964" data-username="carleslloret" href="https://community.nxp.com/people/carleslloret"&gt;carles lloret&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-"By typing and defining as such "PORT_H_PIE BIN2BYTE(00000000) ", is it enough to define or change the behaviour of the GPIO in the PORT H? Is even PORT_H_PIE a key word?" -&amp;gt; If only have this define, while didn't assignment to related register, it just a&amp;nbsp; key word.&lt;/P&gt;&lt;P&gt;- I was wondering why you define these. When create a new project on CW, even if don't include Processor Expert, there is a header file "MC9S12XS128.h", it has define ports direction, input, output.... ,you can directly use.&lt;/P&gt;&lt;P&gt;- BTW, what about the exactly definition about "BIN2BYTE()" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2019 03:36:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/GPIO-behaviour-registers-in-mc9s12xs128/m-p/863797#M7403</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-01-14T03:36:08Z</dc:date>
    </item>
  </channel>
</rss>

