AnsweredAssumed Answered

portdd in mcf5213 programming

Question asked by Maksim Zykov on Sep 25, 2014
Latest reply on Sep 30, 2014 by Maksim Zykov

Hi,

code for PORTC , found in CW examples works :

/* Enable signals as GPIO */

    MCF_GPIO_PTCPAR = 0

        | MCF_GPIO_PTCPAR_DTIN3_GPIO

        | MCF_GPIO_PTCPAR_DTIN2_GPIO

        | MCF_GPIO_PTCPAR_DTIN1_GPIO

        | MCF_GPIO_PTCPAR_DTIN0_GPIO;

     /* Set output values */

    MCF_GPIO_PORTTC = number;

    /* Enable signals as digital outputs */

    MCF_GPIO_DDRTC = 0

        | MCF_GPIO_DDRTC_DDRTC3

        | MCF_GPIO_DDRTC_DDRTC2

        | MCF_GPIO_DDRTC_DDRTC1

        | MCF_GPIO_DDRTC_DDRTC0;

But I can not manage how to do the same with PORTDD

Tried :

/* Enable signals as _GPIO_ */

    MCF_GPIO_PDDPAR = 0

        | MCF_GPIO_PDDPAR_PDD3_GPIO

        | MCF_GPIO_PDDPAR_PDD2_GPIO

        | MCF_GPIO_PDDPAR_PDD1_GPIO

        | MCF_GPIO_PDDPAR_PDD0_GPIO;

    /* Set output values */

    MCF_GPIO_PORTDD = number;

    /* Enable signals as digital _outputs_ */

    MCF_GPIO_DDRDD = 0

        | MCF_GPIO_DDRDD_DDRDD3

        | MCF_GPIO_DDRDD_DDRDD2

        | MCF_GPIO_DDRDD_DDRDD1

        | MCF_GPIO_DDRDD_DDRDD0;

No luck, it seems that PORTDD still in input state.

Any help will be highly appreciated.

Thanks in advance.

Outcomes