Skip to content

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

Merged
merged 4 commits into from
Apr 24, 2017
Merged

Enable USB capabilities on NUCLEO_F446RE #3988

merged 4 commits into from
Apr 24, 2017

Conversation

Ingramz
Copy link
Contributor

@Ingramz Ingramz commented Mar 22, 2017

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

@adbridge adbridge self-requested a review March 30, 2017 16:09
Copy link
Contributor

@adbridge adbridge left a 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

@@ -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"],
Copy link
Contributor

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 ?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

#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

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 4, 2017

@bcostm @LMESTM @jeromecoutant please review

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 4, 2017

retest uvisor

@jeromecoutant
Copy link
Collaborator

@jamike

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 24, 2017

@Ingramz Can you please sign https://developer.mbed.org/contributor_agreement/ ?

@Ingramz
Copy link
Contributor Author

Ingramz commented Apr 24, 2017

@0xc0170 I've already signed it for another PR. See https://developer.mbed.org/users/ingram/

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 24, 2017

@bcostm @LMESTM @jeromecoutant Please review

@adustm
Copy link
Member

adustm commented Apr 24, 2017

LGTM

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.

7 participants