AnsweredAssumed Answered

FOPT and using RESET_b as GPIO on KL03

Question asked by Daniel Samarin on Jul 22, 2016
Latest reply on Jul 31, 2016 by Kerry Zhou

Hi,

 

I'm trying to use the RESET_b pin in its ALT1 configuration on the MKL03Z8VFG4, PTA1 GPIO.

 

I'm using uVision and created the project there. In the startup_MKL03Z4.s file, I see the line:

FOPT      EQU      0xBD

To changed the value to

FOPT      EQU      0xB5     ;     1011 0101

in order to disable the RESET function.

Then in my main.c, I put:

PORTA_PCR1 = 0x141;

GPIOA_PDDR = 0x2;

GPIOA_PSOR = 0x2;

while(1){

        for(int i=0; i<200000; i++){}

        GPIOA_PTOR = 0x2;        // port A pin 1 toggle

    }

I see a little something happening on the pin (like toggling between GND and Hi-Z) but it's not driving an LED. What am I doing wrong?

 

Thanks!!!

Outcomes