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
DISCO_L475VG_IOT01A: Add a list of restricted GPIO pins for testing #12380
DISCO_L475VG_IOT01A: Add a list of restricted GPIO pins for testing #12380
Conversation
@@ -52,6 +52,94 @@ | |||
#include "PinNamesTypes.h" | |||
#include <mstd_cstddef> | |||
|
|||
//*** GPIO *** | |||
// Pinmap used for FPGA GPIO testing only | |||
MSTD_CONSTEXPR_OBJ_11 PinMap PinMap_GPIO[] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not a big fan of this proposal.
espacially this is really are to read - this is supposed to be an exclusion table and it actually contains all the defined pins with dummy values ... can't we at least create an enum the list of pins that need to be excluded from the test ?
That would be easier to read and create .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done in the same way as other peripherals. Please check PWM pin-map table where also some pins are commented out because of some reason:
Lines 257 to 260 in 98af2d0
// {PB_6, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 // Connected to STDIO_UART_TX | |
// {PB_6, PWM_16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 1)}, // TIM16_CH1N // Connected to STDIO_UART_TX | |
// {PB_7, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 // Connected to STDIO_UART_RX | |
// {PB_7, PWM_17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM17, 1, 1)}, // TIM17_CH1N // Connected to STDIO_UART_RX |
We have a ready testing utility functions which can deal with the pin-maps. So from our point of view making exceptions here is very problematic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except thePWM and other tables are maps between pins to HW block instances.
The GPIO one is a table mapping pins to nothing ... :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you actually need is a simple list of pins on which you don't want to run a GPIO test. Do you need a table because other MCUs from other vendors a GPIO instance value ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a quick chat with @maciejbocianski @mprse , we think the better way of the achieve the same result as @LMESTM suggested is add const PinList *pinmap_restricted_gpio_pins()
which exclude the GPIO pins can't be tested, this PR will be updated along with some other targets also need to be updated as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I added a mechanism to handle list of restricted GPIO in FPGA testing:
#12379 (comment)
Also here I dropped base commit and added commit with the list of restricted GPIO pins instead.
@mprse, thank you for your changes. |
98af2d0
to
c2cd2bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @LMESTM what do you think about this approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi
I didn't test, but I confirm this list of potential restrictions.
Note that maybe we could use some define value from PinNames.h:
RCC_OSC32_IN = PC_14,
RCC_OSC32_OUT = PC_15,
RCC_OSC_IN = PH_0,
RCC_OSC_OUT = PH_1,
and:
D14 = PB_9, // I2C_SCL
D15 = PB_8, // I2C_SDA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I definitely better like this approach (and Jerome proposal could make it even more generic for all STM32 targets !) - thank you for this update
c2cd2bb
to
3a71f86
Compare
Pull request has been modified.
Thanks, everyone for the discussion and finding optimal solutions for this case. I addressed @jeromecoutant last comment and used define value from
@0xc0170 It would be better to first merge PR #12379 before this one. |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Just in case, restarted CI once referenced PR is on master now. |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Summary of changes
Add a GPIO pinmap for DISCO_L475VG_IOT01A required for FPGA testing.
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers
@ARMmbed/team-st-mcd
@jamesbeyond
@fkjagodzinski @maciejbocianski