2024-02-29 07:51 AM - last edited on 2024-02-29 08:04 AM by SofLit
Hello,
I want to do GPIO initialization for STM32F769I-DISCO
here, i am using those pins in my code:
{GPIO_InitStruct.Pin = EV2_Pin|AF1_Pin|WF5_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
}
EV2_Pin for electrovane AF1_Pin for air-fan
i am connecting the STM32F769i card to relay card and i want to initialize relays to 0 value.
I use this after declaration of pins
{
GPIO_ctrl_relay_AF1(GPIO_OFF);
GPIO_ctrl_relay_EV2(GPIO_OFF);
GPIO_ctrl_relay_WF5(GPIO_OFF);
}
Any Help or suggestion Guys ?
Solved! Go to Solution.
2024-03-01 05:01 AM - edited 2024-03-01 05:03 AM
If I understand well your question, you need to be sure that the relays are off at the startup.
We cannot answer this question for the relays as we don't have your schematics of the circuitry between the GPIOs and the relays but we can answer the question regarding the GPIO pins state.
To unsure that the GPIO pin = 0 at startup:
PS: next time please use </> button to insert your code.
2024-02-29 08:02 AM
Hello,
The issue is not clear.. Do you have any issue?
Did you enable RCC GPIO port clock?
You have to provide GPIO_ctrl_relay_AF1(GPIO_OFF) function content.
Which pin you are using? EV2_Pin, AF1_Pin, WF5_Pin correspond to which GPIO pins?
You need also to provide schematics later if requested!
2024-03-01 02:58 AM
2024-03-01 02:59 AM
2024-03-01 05:01 AM - edited 2024-03-01 05:03 AM
If I understand well your question, you need to be sure that the relays are off at the startup.
We cannot answer this question for the relays as we don't have your schematics of the circuitry between the GPIOs and the relays but we can answer the question regarding the GPIO pins state.
To unsure that the GPIO pin = 0 at startup:
PS: next time please use </> button to insert your code.
2024-03-01 05:29 AM
Thanks,
I appreciate that :smiling_face_with_smiling_eyes: