<?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 MCF5329 LCDC as GPIO in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329-LCDC-as-GPIO/m-p/266632#M11746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use the LCDC LD0 and LD1 as GPIO output pins.&lt;/P&gt;&lt;P&gt;From reading the 5329 ref manual, they default to GPIO and configured as inputs..&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I have configured it for GPIO anyway. I can set and clear&amp;nbsp; LD0 but&lt;/P&gt;&lt;P&gt;can't seem to do anything with LD1.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the following code to configure and drive.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VMCF5329_GPIO_STRUCT_PTR gpio = &amp;amp;((VMCF5329_STRUCT_PTR)_PSP_GET_IPSBAR())-&amp;gt;GPIO;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PAR_LCDDATA = 0;&lt;/STRONG&gt; //configure as GPIO&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PDDR_LCDDATAL = 0x03; &lt;/STRONG&gt;//LD0 and LD1 as output&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PPDSDR_LCDDATAL = MCF5329_GPIO_PPDSDR_x0 || MCF5329_GPIO_PPDSDR_x1;&lt;/STRONG&gt;&amp;nbsp; //to set LD0 &amp;amp; LD1&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PCLRR_LCDDATAL = MCF5329_GPIO_PCLRR_x0 || MCF5329_GPIO_PCLRR_x1;&lt;/STRONG&gt;&amp;nbsp; // to clear LD0 &amp;amp; LD1&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PODR_LCDDATAL = 0x0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PODR_LCDDATAL = 0x3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see LD0 changing state but not LD1. Not sure what I doing wrong or missed anything out.&lt;/P&gt;&lt;P&gt;Note : I have not done anything with drive strength.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Apr 2013 10:43:58 GMT</pubDate>
    <dc:creator>JD1z</dc:creator>
    <dc:date>2013-04-15T10:43:58Z</dc:date>
    <item>
      <title>MCF5329 LCDC as GPIO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329-LCDC-as-GPIO/m-p/266632#M11746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use the LCDC LD0 and LD1 as GPIO output pins.&lt;/P&gt;&lt;P&gt;From reading the 5329 ref manual, they default to GPIO and configured as inputs..&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I have configured it for GPIO anyway. I can set and clear&amp;nbsp; LD0 but&lt;/P&gt;&lt;P&gt;can't seem to do anything with LD1.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the following code to configure and drive.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VMCF5329_GPIO_STRUCT_PTR gpio = &amp;amp;((VMCF5329_STRUCT_PTR)_PSP_GET_IPSBAR())-&amp;gt;GPIO;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PAR_LCDDATA = 0;&lt;/STRONG&gt; //configure as GPIO&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PDDR_LCDDATAL = 0x03; &lt;/STRONG&gt;//LD0 and LD1 as output&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PPDSDR_LCDDATAL = MCF5329_GPIO_PPDSDR_x0 || MCF5329_GPIO_PPDSDR_x1;&lt;/STRONG&gt;&amp;nbsp; //to set LD0 &amp;amp; LD1&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PCLRR_LCDDATAL = MCF5329_GPIO_PCLRR_x0 || MCF5329_GPIO_PCLRR_x1;&lt;/STRONG&gt;&amp;nbsp; // to clear LD0 &amp;amp; LD1&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PODR_LCDDATAL = 0x0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio-&amp;gt;PODR_LCDDATAL = 0x3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see LD0 changing state but not LD1. Not sure what I doing wrong or missed anything out.&lt;/P&gt;&lt;P&gt;Note : I have not done anything with drive strength.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 10:43:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329-LCDC-as-GPIO/m-p/266632#M11746</guid>
      <dc:creator>JD1z</dc:creator>
      <dc:date>2013-04-15T10:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5329 LCDC as GPIO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329-LCDC-as-GPIO/m-p/266633#M11747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the manual that should work. I have an MCF5329 here on a board, connected to a video chip. It doesn't have LD0 connected, but it does have LD1 connected to the video, and I can see the effect of writing LD1 as a GPIO. I'm using GDB through&amp;nbsp; a P&amp;amp;E Multilink:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;(gdb) x/b 0xfc0a405d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # LCD Pin Assignment Register
0xfc0a405d:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xff&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Set to LCDC
(gdb) set *(uint8_t *)0xfc0a405d = 0xfc # LCD Pin Assignment Register, set LD0-LD7 as GPIO
(gdb) set *(uint8_t *)0xfc0a4023 = 0x03 # LCD PDDR, LD0, LD1 as output.
(gdb) set *(uint8_t *)0xfc0a400f = 0x00 # All pins low
(gdb) set *(uint8_t *)0xfc0a400f = 0x02 # LD1 high
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd check that the macros you're using are generating the right addresses.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'd also read back the registers in a debugger - and set them in the debugger too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It may be a hardware problem. Change LD1 to an input and see if you can send signals into that pin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 23:41:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329-LCDC-as-GPIO/m-p/266633#M11747</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2013-04-15T23:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5329 LCDC as GPIO</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329-LCDC-as-GPIO/m-p/266634#M11748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just tried the addresses rather than the macros. It still behaves the same way.&lt;/P&gt;&lt;P&gt;Added a line to show the current status of the port, from this I could see LD1 was always 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the modifications carried out and found that LD1 was shorted to gnd. Once&lt;/P&gt;&lt;P&gt;this was sorted all worked as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jaswinder&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 09:43:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5329-LCDC-as-GPIO/m-p/266634#M11748</guid>
      <dc:creator>JD1z</dc:creator>
      <dc:date>2013-04-16T09:43:47Z</dc:date>
    </item>
  </channel>
</rss>

