This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Intialization of N2HET1 as GPIO pins

Hi,

Here i need  confirmation of how to configue the NEHET pins as the GPIO pins.In my application some of the pins i need to configure as a output high.

Please confirm the below code is correct or not.

/*N2HET1_22,N2HET1_0,N2HET1_13 as output*/

hetREG1->DIR |=0x00002001;

/*N2HET1_22,N2HET1_0 and N2HET1_13 as open drain*/

hetREG1->PDR |=0x00402001;

/*N2HET1_0 and N2HET1_13 as high*/

hetREG1->DOUT |=0x00002001;

/*N2HET1_22 as low*/

hetREG1->DOUT &=0xFFBFFFFF;

And also please confirm the SCI pins configuration given below:

kickerReg->KICKER0=0x83E70B13U;

kickerReg->KICKER1=0x95A4F1E0;

pinMuxReg->PINMUX7 =PINMUX_PIN_38_SCIRX;

pinMuxReg->PINMUX8=PINMUX_PIN_39_SCITX;

kickerReg->KICKER0=0x00000000;

kickerreg->KICKER1 =0x00000000;

Thanks and Regards,

Silpa

 

 

 

  • Hello Silpa,

    My comments is in blue:

    /*N2HET1_22,N2HET1_0,N2HET1_13 as output*/

    hetREG1->DIR |=0x00002001;  -->0x00402001 

    /*N2HET1_22,N2HET1_0 and N2HET1_13 as open drain*/

    hetREG1->PDR |=0x00402001;

    /*N2HET1_0 and N2HET1_13 as high*/

    hetREG1->DOUT |=0x00002001;

    /*N2HET1_22 as low*/

    hetREG1->DOUT &=0xFFBFFFFF;

    And also please confirm the SCI pins configuration given below:

    kickerReg->KICKER0=0x83E70B13U;

    kickerReg->KICKER1=0x95A4F1E0;

    pinMuxReg->PINMUX7 =PINMUX_PIN_38_SCIRX;   &= ~(0xFF << 16);

                                                                                |= (0x01 << 17);

    pinMuxReg->PINMUX8=PINMUX_PIN_39_SCITX;  &= ~(0xFF << 0);

                                                                             |= (0x01 << 0)

    kickerReg->KICKER0=0x00000000;

    kickerreg->KICKER1 =0x00000000;

    I am sorry I don't know your definition of PINMUX_PIN_38_SCIRX and PINMUX_PIN_39_SCIRX

    regards,

    QJ

  • Hi QJ,

    I'm unable to write the values into the KICKER0/1  registers.

    Currently i'm executing the code in Supervisor mode.But after executing the instruction also its showing 0x00 in the 0xFFFFEA38 and 0xFFFFEA3C.

    Can u please tell me how to change the mode to privileged mode?

    Reagrds,

    Silpa