-
Notifications
You must be signed in to change notification settings - Fork 3k
New support for the STM NUCLEO_L433RC-P board #5230
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
Conversation
Thanks a lot ! We'll review the code and run mbed2 and mbed5 tests for all toolchains. |
PB_14 = 0x1E, | ||
PB_15 = 0x1F, | ||
|
||
#ifndef STM32L433_48PINS // 48 pin versions don't have PC0-PC15 pins |
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.
Where is this define set ?
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.
The define STM32L433_48PINS can be set by users to limited to pins to the 48 pin versions of the STM433 MCUs, by default this is included because the Nucleo board uses the 64 pin version.
The define STM32L433_100PINS can be set by users to extend the pins to the 100 pin versions of the STM433 MCUs.
The is reasonable to be more flexible for the pin definition which allows many more 433 MCUs to be used.
The __weak of PinMaps in the PeripheralPins.c allows to extend this for other MCUs, another option would be to use the PeripheralPins.c for the 100 pin MCU version which is a superset of the 64 pin version.
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.
OK. The __weak is a good idea and we prefer this solution.
|
||
//*** PWM *** | ||
// TODO: Timers/PWM for the L433xx need to be reviewed/completed, | ||
// Check for TIM6/TIM7 of the 433 |
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 don't see any PWM pins on TIM6/TIM7 in the DataSheet.
Can you add the "_ALTx" on the pins that we don't use ? You will need also to add the _ALTx definitions in the PinNames.h file (see NUCLEO_F429ZI for example).
//*** SERIAL *** | ||
|
||
__weak const PinMap PinMap_UART_TX[] = { | ||
// {PA_2, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, |
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.
Can you add a comment:
// Cannot be used as UART2 is used for STDIO
}; | ||
|
||
__weak const PinMap PinMap_UART_RX[] = { | ||
// {PA_3, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, |
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.
Can you add a comment:
// Cannot be used as UART2 is used for STDIO
{PA_1, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, | ||
{PA_12, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, | ||
{PA_15, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, | ||
{PB_1, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, |
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.
Can you add the "_ALTx" on the pins that we don't use ?
|
||
__weak const PinMap PinMap_UART_CTS[] = { | ||
{PA_0, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, | ||
{PA_6, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, |
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.
Can you add the "_ALTx" on the pins that we don't use ?
{PA_6, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, | ||
{PA_11, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, | ||
{PB_4, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, | ||
{PB_13, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, |
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.
Can you add the "_ALTx" on the pins that we don't use ?
{PA_7, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PA_12, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PB_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PB_5, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, |
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.
Can you add the "_ALTx" on the pins that we don't use ?
__weak const PinMap PinMap_SPI_SSEL[] = { | ||
{PA_4, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PA_4, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, | ||
{PA_15, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, |
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.
Can you add the "_ALTx" on the pins that we don't use ?
__weak const PinMap PinMap_SPI_SCLK[] = { | ||
{PA_1, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PA_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PB_3, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, |
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.
Can you add the "_ALTx" on the pins that we don't use ?
__weak const PinMap PinMap_SPI_MISO[] = { | ||
{PA_6, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PA_11, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, | ||
{PB_4, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, |
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.
Can you add the "_ALTx" on the pins that we don't use ?
* I declared all mapping tables as weak to allow custom overwrites for similar MCU models | ||
* The busy GPIOs e.g. PA_3/3 are still declared to allow reusing them for other IO. | ||
*/ | ||
|
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.
Can you please replace the 2 above notes with this one:
//==============================================================================
// Notes
//
// - The pins mentionned Px_y_ALTz are alternative possibilities which use other
// HW peripheral instances. You can use them the same way as any other "normal"
// pin (i.e. PwmOut pwm(PA_7_ALT0);). These pins are not displayed on the board
// pinout image on mbed.org.
//
// - The pins which are connected to other components present on the board have
// the comment "Connected to xxx". The pin function may not work properly in this
// case. These pins may not be displayed on the board pinout image on mbed.org.
// Please read the board reference manual and schematic for more information.
//
// - All mapping tables are declared as weak to allow custom overwrites for similar MCU models.
//
//==============================================================================
"macro_name": "CLOCK_SOURCE" | ||
} | ||
}, | ||
"detect_code": ["0770"], |
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 have the ID 0779
when I connect my NUCLEO-L433RC-P.
Can you confirm the ID you see in the MBED.HTM file (first 4 digits in the code field) ?
<meta http-equiv="refresh" content="0; url=http://mbed.org/device/?code=07790221172C637A2868F53E"/>
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 my Code is: code=07790221172F6363286BF527
As the board is a NUCLEO_L433RC-P can you please change the name is this PR title and also in the files ? |
targets/targets.json
Outdated
@@ -1345,6 +1345,23 @@ | |||
"release_versions": ["2", "5"], | |||
"device_name": "STM32L432KC" | |||
}, | |||
"NUCLEO_L433RC": { |
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 change the name to NUCLEO_L433RC_P
tools/build_travis.py
Outdated
@@ -54,6 +54,7 @@ | |||
{ "target": "NUCLEO_F411RE", "toolchains": "GCC_ARM", "libs": ["dsp", "usb"] }, | |||
{ "target": "NUCLEO_F412ZG", "toolchains": "GCC_ARM", "libs": ["dsp"] }, | |||
{ "target": "NUCLEO_L432KC", "toolchains": "GCC_ARM", "libs": ["dsp"] }, | |||
{ "target": "NUCLEO_L433RC", "toolchains": "GCC_ARM", "libs": ["dsp"] }, |
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.
NUCLEO_L433RC_P
tools/export/sw4stm32/__init__.py
Outdated
@@ -244,6 +244,11 @@ class Sw4STM32(GNUARMEclipse): | |||
'name': 'NUCLEO-L432KC', | |||
'mcuId': 'STM32L432KCUx' | |||
}, | |||
'NUCLEO_L433RC': |
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.
NUCLEO_L433RC_P
tools/export/sw4stm32/__init__.py
Outdated
@@ -244,6 +244,11 @@ class Sw4STM32(GNUARMEclipse): | |||
'name': 'NUCLEO-L432KC', | |||
'mcuId': 'STM32L432KCUx' | |||
}, | |||
'NUCLEO_L433RC': | |||
{ | |||
'name': 'NUCLEO-L433RC', |
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.
NUCLEO-L433RC-P
tools/export/sw4stm32/__init__.py
Outdated
'NUCLEO_L433RC': | ||
{ | ||
'name': 'NUCLEO-L433RC', | ||
'mcuId': 'STM32L433RCUx' |
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.
STM32L433RCTxP
@bcostm I did all the changes you proposed, however no ALTx changes. |
@ohagendorf Danke, now I understand, the PinMap table as an unique index for each pin therfore we use alternate names for multiple pin options. Working on it. |
|
||
__weak const PinMap PinMap_UART_RX[] = { | ||
// {PA_3, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, | ||
{PA_3, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, |
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.
Can you add a comment:
// Connected to STDIO_UART_RX
Thanks @helmut64 |
@bcostm I keep the PC_5, PD_2 because I use the STM433RCT for my projects. This is not hurting and helps me. |
@bcostm I reviewed the targets.json file for our new target, here are some questions: b) SERIAL_ASYNCH c) "release_versions": ["2", "5"], Your advise will be appreciated. |
overwrites for different MCU kinds.
added connected to STDIO_UART_XX comments
Comment out the STM32L433_100PINS defined because PD_2 is already used in the PeripheralPins.c, otherwise it will not compile
Added SERIAL_ASYNCH into STM32L432KC target, it is now identical with the STM32L433RC_P and other STM L4 targets.
MBED_APP_START/MBED_APP_SIZE variables
MORPHO headers
…4/mbed-os into NUCLEO_STM32L433_SUPPORT
I did the rebase. I hope that this is now good. |
@helmut64 The branch shows here 250+ commits, it should contain only your changes. |
@0xc0170 Hello Martin, than I will create a new branch, redo the changes and push it. |
Whatever works for you. It would be good to resolve it here via rebase but a new branch also work. This would be closed and new PR opened. |
I created a new pull request #5591 branch NUCLEO_STM32L433_NEW |
Dear ST and MBED team,
I added support for a new the target NUCLEO_L433RC.
The L433 is pretty much like the L432, but STDIO pins and peripherals are different.
I tested this using the official NUCLEO_L433RC board from STM.
I have not done the job for export_test.py and tests.py as documented in “steps-to-create-a-new-STM32-platform” because the documentation does not match file files.
Regards Helmut