AnsweredAssumed Answered

Seeking Kinetis demo code under KDS 3.0.0

Question asked by Gary Lynch on Nov 2, 2015
Latest reply on Nov 4, 2015 by Gary Lynch

I am trying to get up to speed with Kinetis processors, have
a Tower TWR-K60D100M and Kinetis Design Studio 3.0.0.  This
is my first ARM Cortex project.

 

I have downloaded the "Kinetis Peripheral Module, Quick
Reference":
- http://cache.freescale.com/files/32bit/doc/quick_ref_guide/KQRUG.pdf

which calls out a demo code package, KINETIS512_SC.zip, that
I also have installed. I have gotten the LEDs to blink and
want to move on to reading the switches.  The Quick User
Guide doesn't provide much help in configuring an I/O port
as an input.  On page 18 there is a snippet:
>
> /* Configure the PTA4 pin for its GPIO function */
> PORTA_PCR4 = PORT_PCR_MUX(0x1); // GPIO is alt1 function for this pin
>
> /* Configure the PTA4 pin for rising edge interrupts */
> PORTA_PCR4 |= PORT_PCR_IRQC(0x9);
>
> /* Initialize the NVIC to enable the specified IRQ */
> enable_irq(87);
>

which claims to configure a port, but it is incomplete.
Furthermore, I can't find this snippet in the files I
unzipped.

 

I can find sample code for my processor under Code Warrior
and other processors under KDS, but not the two together. Is
there a general support package for my configuration that
also includes more complex examples like driving an SPI or
CAN port, running continuous conversions on the A/D
converter, or generating hardware PWM on a digital output?

 

(Advance thanks for any tips.)

Outcomes