I am working on the MK22FX512VLK12
I have noticed that Even though I have PTA:Init_GPIO when I use GPIO1:GPIO_LDD I need to use an Init function even though an Init function already exits in the PE_LOW_level_init(); function.
to elaorate
in main() > PE_low_level_init()
there is a function PTA_Init()
and when I used GPIO1:GPIO_LDD
(under typical usage)
I see that I need another init function?
Component documentation - Typical Usage
LDD_TDeviceData *MyGPIO1Ptr; void main(void) { ... MyGPIO1Ptr = GPIO1_Init((LDD_TUserData *)NULL); /* Initialize the pins */ GPIO1_SetFieldValue(MyGPIO1Ptr, Bus, 0b1100U); /* Configure the output value */ /* Output values: PTA12 = 0, PTA13 = 0, PTA14 = 1, PTA15 = 1 */ } |
Why are there two init functons? could I use GPIO as well as the other periphrials without the LDD device?
Hello Jace,
About this "
in main() > PE_low_level_init()
there is a function PTA_Init()
"
DO you meaning the GPIO1_Init(NULL):
If yes, you just need disable "Auto initialization" of the GPIO1_LDD component , it will disappear:
If no, do you meanint the PTA4 ?
This is initialize the PTA4 to NMI_b function .
If neither of these , please take a screenshot tell me , thank!
Hope it helps
Have a great day,
Alice Yang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------