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
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!
-----------------------------------------------------------------------------------------------------------------------
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.