MKM34 problem GPIO PTH5..7

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

MKM34 problem GPIO PTH5..7

531 Views
eduardomoretti
Contributor I

Hello, i´m working with KMK34 , i use Kinetis-M Peripheral Bare-Metal Drivers, but output PORT PTH GPIO  not work PTH5, PTH6, and PTH7   but pins PTH0 ..... to PTH4 ok

im use

PORT_Init (PORTH, PORT_MODULE_LED_MODE, 0xFF);

GPIO_Init (GPIOH, GPIO_OUT_LOGIC1_MODE, 0xFF);

GPIO_Tgl(FGPIOH, 0xFF);

Please help

0 Kudos
2 Replies

391 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

For KM34 doesn't provide FGPIO register definition, it need to use GPIOH instead of FGPIOH:

GPIO_Tgl(GPIOH, 0xFF);

Wish it helps.


Have a great day,
Ma Hui

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

0 Kudos

391 Views
MarMi
NXP Employee
NXP Employee

Hi,

both GPIOH and FGPIOH arguments for GPIO_Tgl/Set/Clr macros shall work and perform identical tasks in Kinetis-M bare metal drivers. Note however that on 128kB versions of Kinetis-M devices PORT H6, PORT H7 and PORT I1 are open drain and therefore you might have problems seeing these pins toggling unless external pull-ups are added into your design. I cannot explain why PORT H5 wasn't working in your case because this one is architectured to operate in push-pull  mode.

Martin M.  

0 Kudos