High and low level of GPIO is between 0.7 and 0.3 Volt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

High and low level of GPIO is between 0.7 and 0.3 Volt

Jump to solution
1,176 Views
aminesedki_as
Contributor I

Hello,

I just begin with K60 micro and installed MCUxpresso, when i used the config tools to add a GPIO port and when i use GPIO_WritePinOutput but i see that high and low level of GPIO is between 0.7 and 0.3 Volt can someone help me to resolve this problem

Thank u all. 

Labels (1)
0 Kudos
Reply
1 Solution
1,076 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Amine,

 Do you test the board directly or with the TWR-ELEV board?

  I just test the TWR-K60D100 board directly, then test the A16.

pastedImage_1.png

I test the SDK gpio_led_output project in the SDK code, which can be downloaded from this link:

Welcome | MCUXpresso SDK Builder 

I modify these point:

#define BOARD_LED_ORANGE_GPIO_PIN 14U //11U

void BOARD_InitPins(void) {
  CLOCK_EnableClock(kCLOCK_PortA);                           /* Port A Clock Gate Control: Clock enabled */
  CLOCK_EnableClock(kCLOCK_PortE);                           /* Port E Clock Gate Control: Clock enabled */

  PORT_SetPinMux(PORTA, PIN11_IDX, kPORT_MuxAsGpio);         /* PORTA11 (pin L9) is configured as PTA11 */
  PORT_SetPinMux(PORTE, PIN8_IDX, kPORT_MuxAlt3);            /* PORTE8 (pin F3) is configured as UART5_TX */
  PORT_SetPinMux(PORTE, PIN9_IDX, kPORT_MuxAlt3);            /* PORTE9 (pin F2) is configured as UART5_RX */
    
    PORT_SetPinMux(PORTA, 14u, kPORT_MuxAsGpio);    //kerry add
}

Then test it, the PTA14 GPIO wave is:

pastedImage_3.png

You can find it works OK.

So, please try it again on your side.

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
6 Replies
1,076 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Amine,

   What the K60 detail part number you are using?

   Please tell me which pin you are using as the GPIO function? Do you enable the port pull up function and set the pin port mux as GPIO function?

  


Have a great day,
Kerry

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
1,076 Views
aminesedki_as
Contributor I

Hi Kerry thanks for u feedback

I use a TWR-K60D100M

PIN number PTA14  (GPIOA L10) A16 on J11A

I juste set the pin as an ouptut and take a 0 logic as an initial value (no pull up)  and generate the configuration via config tools than update the project.

0 Kudos
Reply
1,077 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Amine,

 Do you test the board directly or with the TWR-ELEV board?

  I just test the TWR-K60D100 board directly, then test the A16.

pastedImage_1.png

I test the SDK gpio_led_output project in the SDK code, which can be downloaded from this link:

Welcome | MCUXpresso SDK Builder 

I modify these point:

#define BOARD_LED_ORANGE_GPIO_PIN 14U //11U

void BOARD_InitPins(void) {
  CLOCK_EnableClock(kCLOCK_PortA);                           /* Port A Clock Gate Control: Clock enabled */
  CLOCK_EnableClock(kCLOCK_PortE);                           /* Port E Clock Gate Control: Clock enabled */

  PORT_SetPinMux(PORTA, PIN11_IDX, kPORT_MuxAsGpio);         /* PORTA11 (pin L9) is configured as PTA11 */
  PORT_SetPinMux(PORTE, PIN8_IDX, kPORT_MuxAlt3);            /* PORTE8 (pin F3) is configured as UART5_TX */
  PORT_SetPinMux(PORTE, PIN9_IDX, kPORT_MuxAlt3);            /* PORTE9 (pin F2) is configured as UART5_RX */
    
    PORT_SetPinMux(PORTA, 14u, kPORT_MuxAsGpio);    //kerry add
}

Then test it, the PTA14 GPIO wave is:

pastedImage_3.png

You can find it works OK.

So, please try it again on your side.

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
1,076 Views
aminesedki_as
Contributor I

Hi Kerry,

I modify the project like u tell me than it work fine thank u.

0 Kudos
Reply
1,076 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Amine Sedki,

   Thank you for your updated information.

   And that's very happy it also works on your side.

   Now, if your question is solved, please help me to mark the correct answer, just to close this case, thank you!


Have a great day,
Kerry

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
1,076 Views
mjbcswitzerland
Specialist V


Hi

If you can load the attached binary (or SREC) to your board (standalone TWR-K60D100M without tower kit: J7 open so that the local 50MHz oscillator runs, and J10 1-2 jumper to connect to EXTAL0) you can check whether your problem is:
- HW issue
- Measuremet issue
- SW issue

When it runs it flashes the red LED at 2.5MHz and generates a 1kHz square wave on PTA14 (toggled in a PIT interrupt).
Based on the result on your board you will be able to know which type of problem you have and work on solving which one it is

Good luck

regards

Mark


Complete Kinetis solutions, training and support: http://www.utasker.com/kinetis.html
Kinetis K60:
- http://www.utasker.com/kinetis/TWR-K60N512.html
- http://www.utasker.com/kinetis/TWR-K60D100M.html
- http://www.utasker.com/kinetis/TWR-K60F120M.html
- http://www.utasker.com/kinetis/ELZET80_NET-KBED.html
- http://www.utasker.com/kinetis/ELZET80_NET-K60.html

0 Kudos
Reply