Couldn't set and reset a GPIO using the HAL_GPIO_Write function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-16 11:15 AM
Dear ST Hello,
I couldn't understand why I couldn't set and reset the PB4 GPIO. I am trying to visualize the GpIO signal using an oscilloscope.
I am using CubeMx for this project
I am using this GPIO for CS with SPI3.
HAL_GPIO_WritePin(SPI3_CS_GPIO_Port, SPI3_CS_Pin, GPIO_PIN_RESET);
status = HAL_SPI_TransmitReceive(&hspi3, (uint8_t*)aTxBuffer, (uint8_t *)aRxBuffer, BUFFERSIZE, 5000);
HAL_GPIO_WritePin(SPI3_CS_GPIO_Port, SPI3_CS_Pin, GPIO_PIN_SET);
Thank you in advance
S.Tarik
Solved! Go to Solution.
- Labels:
-
GPIO-EXTI
-
SPI
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-16 1:34 PM
Why do you think you can't set/reset PB4? Did you start the clock? These should be done in the generated code, but you can also check the GPIO registers to see if it's set correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-16 1:34 PM
Why do you think you can't set/reset PB4? Did you start the clock? These should be done in the generated code, but you can also check the GPIO registers to see if it's set correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-10-18 3:58 AM
I have a ground problem, it's okay now, Thank you.
