Skip to content

STM32 : PeripheralPins.c and PinNames.h files alignment #6931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
May 22, 2018

Conversation

jeromecoutant
Copy link
Collaborator

Description

All STM32 PeripheralPins.c and PinNames.h files are now aligned

Script from #6929 has been applied for only (but all) NUCLEO and DISCO boards.

Regression tests are green on my side.

Pull request type

[ ] Fix
[X] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

Copy link
Contributor

@bcostm bcostm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks.
I tried to check all files and found some issues below. Seems also that QSPI pins are missing ?

// {PA_14, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)}, // SWCLK
{PB_6, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
{NC, NC, 0}
{PA_2, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)}, // Connected to STDIO_UART_TX
Copy link
Contributor

@bcostm bcostm May 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Humm no PA_1 now. Can you double check with datasheet ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked: no UART_TX PA_1

{PA_2, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to STDIO_UART_TX
{PA_9, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
// {PA_14, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to SWCLK
{PB_3, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to SWO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't comment pins connected to SWO?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussion, we will not comment SWO pin,
and I need to remove comment for SWCLK

USB_DM = PA_11,
USB_DP = PA_12,

/**** No ETHERNET pins ***/
Copy link
Contributor

@bcostm bcostm May 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remove these comments when there are no pins ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

#ifdef MBED_CONF_TARGET_STDIO_UART_TX
{PA_2, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2
{PA_2, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 // Connected to STDIO_UART_TX
Copy link
Contributor

@bcostm bcostm May 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these pins are not commented ? It looks like this file has not been well processed by the script ? The warning above about the STDIO pins is also different.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a specific case for the NUCLEO_F401RE...
I have implemented the MBED_CONF_TARGET_STDIO_UART_TX switch ifdef before proposing the WEAK feature.
I think I can't remove this now.

{PB_15, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)},
{PC_3, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)},
{PC_12, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)},
{PD_6, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is GPIO_AF5_SPI3

{PE_12, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to D9 [D9_IS66WV51216EBLL]
{PG_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to PSRAM_A15 [A15_IS66WV51216EBLL]
{PG_12, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to UART1_RTS [STMOD+_UART]
{PI_0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All QSPI pins have disappeared.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as QSPI is not in master yet

@jeromecoutant
Copy link
Collaborator Author

Thx @bcostm for the review

Updates have been pushed : b30f3ab

@cmonr
Copy link
Contributor

cmonr commented May 21, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented May 21, 2018

Build : SUCCESS

Build number : 2085
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6931/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented May 21, 2018

@mbed-ci
Copy link

mbed-ci commented May 22, 2018

@cmonr cmonr merged commit 3bcc076 into ARMmbed:master May 22, 2018
@jeromecoutant jeromecoutant deleted the PR_PERIPH branch May 23, 2018 07:17
kevinong0108 added a commit to kevinong0108/mbed-os that referenced this pull request Jan 9, 2019
This issue is start on ARMmbed#6931

ADC pins must need STM_PIN_ANALOG_CONTROL_BIT to call LL_GPIO_EnablePinAnalogControl
adbridge pushed a commit that referenced this pull request Jan 14, 2019
This issue is start on #6931

ADC pins must need STM_PIN_ANALOG_CONTROL_BIT to call LL_GPIO_EnablePinAnalogControl
yossi2le pushed a commit to yossi2le/mbed-os that referenced this pull request Jan 24, 2019
This issue is start on ARMmbed#6931

ADC pins must need STM_PIN_ANALOG_CONTROL_BIT to call LL_GPIO_EnablePinAnalogControl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants