<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Turning on a LED on KL64Z</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/41437/turning-on-a-led-on-kl64z</link><description> 
Having these addresses: 

 
; - User data section ------------------------------------- 
AREA UserData, DATA, READONLY 

 
LEDS EQU 0x4000703C ; access PD3-PD0 
GPIO_PORTD_DOR EQU 0xF80FF0C0 
GPIO_PORTD_PSOR EQU 0xF80FF0C4 
GPIO_PORTD_PCOR EQU 0xF80FF0C8</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Turning on a LED on KL64Z</title><link>https://community.arm.com/thread/131613?ContentTypeID=1</link><pubDate>Thu, 24 Nov 2016 11:53:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9ad7687e-3376-4acf-943d-349c8638c7cf</guid><dc:creator>Sergio Rodr&amp;#195;ƒ&amp;#198;’&amp;#195;‚&amp;#194;&amp;#173;guez Rama</dc:creator><description>&lt;p&gt;&lt;p&gt;
; - User data section&lt;br /&gt;
AREA UserData, DATA, READONLY&lt;br /&gt;
K DCD 5&lt;br /&gt;
; - Main Program&lt;br /&gt;
AREA MainCode, CODE, READONLY, ALIGN=3&lt;br /&gt;
__main PROC&lt;br /&gt;
; 1) activate clock for Port D&lt;br /&gt;
LDR r1, =SYSCTL_RCGC2_GPIOD&lt;br /&gt;
LDR r0, =K&lt;br /&gt;
LDR r0, [r0]&lt;br /&gt;
STR r0, [r1]&lt;br /&gt;
ENDP&lt;br /&gt;
END&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turning on a LED on KL64Z</title><link>https://community.arm.com/thread/129305?ContentTypeID=1</link><pubDate>Thu, 24 Nov 2016 11:51:46 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2850c972-c700-4a2d-8e7e-60fbadc78aab</guid><dc:creator>Sergio Rodr&amp;#195;ƒ&amp;#198;’&amp;#195;‚&amp;#194;&amp;#173;guez Rama</dc:creator><description>&lt;p&gt;&lt;p&gt;
Our teacher gave us this:&lt;/p&gt;

&lt;p&gt;
Peripheral registers are memory mapped and can be accessed by
memory pointers.&lt;/p&gt;

&lt;p&gt;
DEV1 EQU 0x1000 ; Define location for device&lt;br /&gt;
; Read/Write code:&lt;br /&gt;
LDR r1, #DEV1 set up device adrs&lt;br /&gt;
LDR r0, [r1] read DEV1&lt;br /&gt;
LDR r0, #8 ; set up valued to write&lt;br /&gt;
STR r0, [r1] ; write value to device&lt;/p&gt;

&lt;p&gt;
When I tried to copy it on my code, an error ocurred related with
the #&lt;/p&gt;

&lt;p&gt;
So I substituted that code with this:&lt;/p&gt;

&lt;p&gt;
; - User data section ------------------------------------- AREA
UserData, DATA, READONLY&lt;br /&gt;
K DCD 5&lt;/p&gt;

&lt;p&gt;
; - Main Program ------------------------------------------ AREA
MainCode, CODE, READONLY, ALIGN=3&lt;br /&gt;
__main PROC ; 1) activate clock for Port D LDR r1,
=SYSCTL_RCGC2_GPIOD LDR r0, =K LDR r0, [r0] STR r0, [r1]&lt;/p&gt;

&lt;p&gt;
ENDP END&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turning on a LED on KL64Z</title><link>https://community.arm.com/thread/120925?ContentTypeID=1</link><pubDate>Thu, 24 Nov 2016 11:17:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:115f7950-879b-4b69-98b2-fe23451b74cf</guid><dc:creator>Sergio Rodr&amp;#195;ƒ&amp;#198;’&amp;#195;‚&amp;#194;&amp;#173;guez Rama</dc:creator><description>&lt;p&gt;&lt;p&gt;
I am sorry, but I am not going to talk about my school teacher and
teammates here.&lt;br /&gt;
I don&amp;#39;t find it useful. I think I can find it myself, maybe it is a
bit difficult but not imposible.&lt;br /&gt;
If I find the solution, I&amp;#39;ll write it here.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turning on a LED on KL64Z</title><link>https://community.arm.com/thread/108961?ContentTypeID=1</link><pubDate>Thu, 24 Nov 2016 11:06:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:72f758ae-605a-4ba5-8f78-29c94089ea38</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;quot;For sure there is a simple solution.&amp;quot;&lt;/p&gt;

&lt;p&gt;
There is. But why do you not think you can find it yourself? As I
asked before - do you feel your school does a bad job? Are your
school mates also stuck?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turning on a LED on KL64Z</title><link>https://community.arm.com/thread/83426?ContentTypeID=1</link><pubDate>Thu, 24 Nov 2016 09:04:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:00719ff5-4cd5-4e27-b815-0b95c42cd60e</guid><dc:creator>Sergio Rodr&amp;#195;ƒ&amp;#198;’&amp;#195;‚&amp;#194;&amp;#173;guez Rama</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi, I have to do it for tomorrow. I&amp;#39;ve read about GPIO and I know
that I have to:&lt;br /&gt;
- Activate the clock for Port D that is disactivated by default.&lt;br /&gt;
- Set bit 5 of GPIO_PORTD_PDDR (Port Data Direction Register).&lt;br /&gt;
- Set bit 5 of GPIO_PORTD_PDOR (Port Data Output Register).&lt;/p&gt;

&lt;p&gt;
I know the addresses of all these registers but I don&amp;#39;t know which
instructions I have to do(LDR, STR, ...)&lt;/p&gt;

&lt;p&gt;
For sure there is a simple solution.&lt;/p&gt;

&lt;p&gt;
Thanks for your answer.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turning on a LED on KL64Z</title><link>https://community.arm.com/thread/69713?ContentTypeID=1</link><pubDate>Thu, 24 Nov 2016 07:48:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2ec30526-9947-4536-b448-73bf89c5e953</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Have you read the processor documentation?&lt;/p&gt;

&lt;p&gt;
Have you looked at the sample code available? Note that sample
code in C is just as valuable when it comes to figuring out how to
use the processor.&lt;/p&gt;

&lt;p&gt;
Have you talked with the school if you are unhappy with the
tutoring?&lt;/p&gt;

&lt;p&gt;
Since this is a task given to you - how far have you got?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>