MK22FX512VLK12 API

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MK22FX512VLK12 API

927 次查看
jacewalton
Contributor III

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?

标记 (2)
0 项奖励
回复
1 回复

767 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Jace,

About this "

in main() > PE_low_level_init()

there is a function PTA_Init()

"

DO you meaning the GPIO1_Init(NULL):

pastedImage_1.png

If yes, you just need disable "Auto initialization" of the GPIO1_LDD component , it will disappear:

pastedImage_2.png

If no,  do you meanint the PTA4 ?

pastedImage_3.png

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

0 项奖励
回复