-
Notifications
You must be signed in to change notification settings - Fork 3k
Enable USB capabilities on NUCLEO_F446RE #3988
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
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.
@Ingramz please address review question. Otherwise LGTM
targets/targets.json
Outdated
@@ -1111,9 +1111,8 @@ | |||
"supported_toolchains": ["ARM", "uARM", "GCC_ARM"], | |||
"program_cycle_s": 2, | |||
"extra_labels": ["STM", "STM32F4", "STM32F407", "STM32F407xG", "STM32F407VG"], | |||
"macros": ["LSI_VALUE=32000"], | |||
"macros": ["LSI_VALUE=32000", "TRANSACTION_QUEUE_SIZE_SPI=2"], |
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 isn't just a reformatting change. Did you intend for this to go in 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.
This is something that my linter picked up. While it's not strictly forbidden in JSON, behavior for having multiple keys of the same name is not well defined. I believe this was an oversight by a previous commiter, so I decided to "fix" it by merging the entries. Anyone reading this out of context should look a few lines below in the source, where the duplicated 'macros' entry lives.
Although if merging is not correct in this case, I am willing to change it back to its original state or any of suggested forms.
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.
Also after a closer look where LSI_VALUE is defined/used, it seems like the entry in targets.json is redundant as STM32F4 HAL already defines 32000 by default, which means it can be removed.
mbed-os/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_conf.h
Lines 125 to 127 in 9b8efb2
#if !defined (LSI_VALUE) | |
#define LSI_VALUE ((uint32_t)32000U) /*!< LSI Typical Value in Hz*/ | |
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz |
@bcostm @LMESTM @jeromecoutant please review |
retest uvisor |
@Ingramz Can you please sign https://developer.mbed.org/contributor_agreement/ ? |
@0xc0170 I've already signed it for another PR. See https://developer.mbed.org/users/ingram/ |
@bcostm @LMESTM @jeromecoutant Please review |
LGTM |
Description
As mentioned in #3756 (comment) , NUCLEO_F446RE does not have an on-board USB connector, however an external connector can be connected to header pins on the right side of the board (PA8-12). This pull request will enable the support for USB on NUCLEO_F446RE board.
Also in the progress I fixed styling of files that I needed to edit, these are available as separate commits.
Tested using generic USB HID device examples found in handbook.
Status
READY
cc @adustm