-
Notifications
You must be signed in to change notification settings - Fork 3k
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
STM32L5 : add DISCO-L562QE board support #12338
Conversation
@jeromecoutant, thank you for your changes. |
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.
Couple of questions.
targets/TARGET_STM/mbed_overrides.c
Outdated
@@ -150,5 +150,9 @@ void mbed_sdk_init() | |||
#endif /* ! MBED_CONF_TARGET_LSE_AVAILABLE */ | |||
#endif /* DEVICE_RTC */ | |||
|
|||
#if defined (MBED_CONF_TARGET_STMOD_SEL) // DISCO_L562QE |
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.
That worries me a bit and it's a bit confusing. stmod_select
is only defined for this one DISCO board (not even family or SoC). Here we are conditionally compiling the call to it based on MBED_CONF_TARGET_STMOD_SEL
and the function is defined as:
void stmod_select(void)
{
DigitalOut SEL_12(PF_11);
DigitalOut SEL_34(PF_12);
#if (MBED_CONF_TARGET_STMOD_SEL) // UART selection
SEL_12 = 1;
SEL_34 = 1;
#else // SPI selection
SEL_12 = 0;
SEL_34 = 0;
#endif
}
but it's not called anywhere else. I guess it's acceptable, maybe even desirable, for the build to fail if user defines the macro, but the board doesn't provide the function. But maybe it's worth simplifying it a bit? The stmod_select
will only be called when the macro is defined, maybe the function it doesn't need to have the conditional block? Just a comment saying it's only called when the macro is defined and it will force the UART to be selected?
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.
If possible, I'd suggest tweaking the configuration here to pick up the pin names from the STMOD's mbed_lib.json
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.
@bulislaw
Agree. Will propose a new solution.
targets/TARGET_STM/qspi_api.c
Outdated
@@ -35,6 +25,14 @@ | |||
#include "pinmap.h" | |||
#include "PeripheralPins.h" | |||
|
|||
#include "mbed_trace.h" |
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.
Unifying the "tracing/debug/printf" facilities was an item on my TODO list. Do you know what's the cost of enabling it for builds that didn't use it before? For various build profiles?
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.
Yes, unifying the trace facilities was my goal for mbed_trace use.
I didn't check the cost between now (mbed_trace use) and before (mbed_debug use).
targets/TARGET_STM/qspi_api.c
Outdated
|
||
// Reset handle internal state | ||
obj->handle.State = HAL_OSPI_STATE_RESET; | ||
|
||
// Set default OCTOSPI handle values | ||
obj->handle.Init.DualQuad = HAL_OSPI_DUALQUAD_DISABLE; | ||
obj->handle.Init.MemoryType = HAL_OSPI_MEMTYPE_MICRON; | ||
obj->handle.Init.MemoryType = HAL_OSPI_MEMTYPE_MACRONIX; |
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.
That's a generic driver, will that work ok across?
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.
You're right, I changed this only while code reviewing.
I am checking with experts the real impact of this.
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.
It would be good to reuse the STMOD config from mbed_lib.json
/* mbed Microcontroller Library | ||
******************************************************************************* | ||
* Copyright (c) 2018, STMicroelectronics | ||
* All rights reserved. |
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.
lets add SPDX identifiers to new files
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.
done
targets/targets.json
Outdated
"value": 1 | ||
} | ||
}, | ||
"overrides": { "lpticker_delay_ticks": 0 }, |
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.
please fix formatting as the rest of this json (new line should be here?)
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.
done
c8f288f
to
f587cf6
Compare
Pull request has been modified.
Can you attach test logs for this new target? |
Yes |
CI started |
Test run: FAILEDSummary: 1 of 4 test jobs failed Failed test jobs:
|
CI restarted |
Test run: FAILEDSummary: 3 of 11 test jobs failed Failed test jobs:
|
@jeromecoutant there are errors in mbed2 building:
Although there is no mbed 2 release and I'll question this CI stage, what shall we do? |
f587cf6
to
c9aead4
Compare
Pull request has been modified.
Hi |
CI restarted |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
See #12451 |
Summary of changes
New board addition : DISCO_L562QE
https://www.st.com/en/evaluation-tools/stm32l562e-dk.html
NB: Trust Zone is not enabled yet in this version
@ARMmbed/team-st-mcd
@MarceloSalazar
@PLFSTM
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers