Activate a single GPIO

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Activate a single GPIO

ソリューションへジャンプ
1,325件の閲覧回数
GorkaC
Contributor I

Hi,

 

I'm working with the SLN-LOCAL-IOT Audio Kit and the SLN-LOCAL2-IOT-preRC5(SDK) version.

The thing is, it is recommended to use a function that comes with the firmware but I don't find a function that activates a single GPIO. 

By the way, I see that the function "GPIO_PinWrite(GPIO_Type *base, uint32_t pin, uint8_t output)"  is used to write in output pins but I don't know which are the parameters needed this function. 

 

Thanks very much, hope you help me with this problem.

0 件の賞賛
返信
1 解決策
1,297件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
According to the above code, I didn't find the initialization code of the GPIO pin, and I guess your issue is related to missing the initialization code.
In the BOARD_InitPins() function, it illustrates how to configure the pin as the GPIO pin, please refer to it.
Have a great day,
TIC

-------------------------------------------------------------------------------
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 件の賞賛
返信
4 返答(返信)
1,315件の閲覧回数
GorkaC
Contributor I

Hi Jeremy,

Thanks for your quick reply. We tried the blinky led demo (iled_blinky) on our Kit but it does not blink the RED LED like it is supposed to do. 

Code:

GorkaC_0-1623069260847.png

And the defines:

GorkaC_1-1623069370656.png

GorkaC_2-1623069456679.png

We are working with a MIMXRT106SDVL6B.

How can I know the number of each pin of the micro if that's the problem? (Number of the pin related to the number of the parameters in the blinky function).

0 件の賞賛
返信
1,298件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
According to the above code, I didn't find the initialization code of the GPIO pin, and I guess your issue is related to missing the initialization code.
In the BOARD_InitPins() function, it illustrates how to configure the pin as the GPIO pin, please refer to it.
Have a great day,
TIC

-------------------------------------------------------------------------------
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 件の賞賛
返信
1,320件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Below is the comments of the GPIO_PinWrite(GPIO_Type *base, uint32_t pin, uint8_t output) function.

 

/*!
* brief Sets the output level of the individual GPIO pin to logic 1 or 0.
*
* param base GPIO base pointer.
* param pin GPIO port pin number.
* param output GPIOpin output logic level.
* - 0: corresponding pin output low-logic level.
* - 1: corresponding pin output high-logic level.
*/

 

And I'd like to suggest you refer to iled_blinky demo in the SDK library to learn to configure a pin as the GPIO output pin.
Have a great day,
TIC

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

1,306件の閲覧回数
GorkaC
Contributor I

Hi Jeremy,

The iled_blinky demo didn't work.

0 件の賞賛
返信