Merge pull request #3626 from bcostm/dev_usb_nucleo-f412zg

NUCLEO_F412ZG : Add USB Device +Host
pull/3602/merge
Sam Grove 2017-02-02 10:48:07 -06:00 committed by GitHub
commit 419982c546
5 changed files with 18 additions and 7 deletions

View File

@ -15,17 +15,27 @@
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef TARGET_STM32F303ZE
#include "USBHAL_STM32F303ZE.h"
#endif
#if defined(TARGET_STM32F429ZI) || defined(TARGET_STM32F446ZE) || defined(TARGET_STM32F207ZG) \
|| defined(TARGET_STM32F767ZI) || defined (TARGET_STM32F746ZG) || defined(TARGET_STM32F411RE) \
|| defined(TARGET_STM32F407VG) || defined(TARGET_STM32F401RE)
#if defined(TARGET_STM32F207ZG) || \
defined(TARGET_STM32F401RE) || \
defined(TARGET_STM32F407VG) || \
defined(TARGET_STM32F411RE) || \
defined(TARGET_STM32F412ZG) || \
defined(TARGET_STM32F429ZI) || \
defined(TARGET_STM32F446ZE) || \
defined(TARGET_STM32F746ZG) || \
defined(TARGET_STM32F767ZI)
#include "USBHAL_STM_144_64pins.h"
#endif
#ifdef TARGET_STM32L476VG
#include "USBHAL_STM32L476VG.h"
#endif
#ifdef TARGET_STM32F769NI
#include "USBHAL_STM32F769NI.h"
#endif

View File

@ -48,7 +48,7 @@ USBHAL::USBHAL(void) {
// Enable power and clocking
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
#if defined(TARGET_STM32F407VG) || defined(TARGET_STM32F401RE) || defined(TARGET_STM32F411RE) || defined(TARGET_STM32F429ZI)
#if defined(TARGET_STM32F407VG) || defined(TARGET_STM32F401RE) || defined(TARGET_STM32F411RE) || defined(TARGET_STM32F412ZG) || defined(TARGET_STM32F429ZI)
pin_function(PA_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF10_OTG_FS));
pin_function(PA_9, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLDOWN, GPIO_AF10_OTG_FS));
pin_function(PA_10, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS));

View File

@ -18,7 +18,7 @@
/* 144 pins boards */
#if defined(TARGET_NUCLEO_F429ZI) || defined(TARGET_NUCLEO_F446ZE) || defined(TARGET_NUCLEO_F207ZG) \
|| defined(TARGET_NUCLEO_F767ZI) || defined(TARGET_NUCLEO_F746ZG)
|| defined(TARGET_NUCLEO_F767ZI) || defined(TARGET_NUCLEO_F746ZG) || defined(TARGET_NUCLEO_F412ZG)
#include "USBHALHost_STM_144_64pins.h"
#endif

View File

@ -857,7 +857,7 @@
"supported_toolchains": ["ARM", "uARM", "GCC_ARM", "IAR"],
"inherits": ["Target"],
"detect_code": ["0826"],
"macros": ["TRANSACTION_QUEUE_SIZE_SPI=2"],
"macros": ["TRANSACTION_QUEUE_SIZE_SPI=2", "USB_STM_HAL", "USBHOST_OTHER"],
"device_has": ["ANALOGIN", "CAN", "ERROR_RED", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "TRNG"],
"release_versions": ["2", "5"],
"device_name": "STM32F412ZG"

View File

@ -54,7 +54,7 @@ build_list = (
{ "target": "NUCLEO_F401RE", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb", "fat", "usb_host"] },
{ "target": "NUCLEO_F410RB", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
{ "target": "NUCLEO_F411RE", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb", "fat", "usb_host"] },
{ "target": "NUCLEO_F412ZG", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] },
{ "target": "NUCLEO_F412ZG", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb", "fat", "usb_host"] },
{ "target": "NUCLEO_L432KC", "toolchains": "GCC_ARM", "libs": ["dsp", "fat"] },
{ "target": "NUCLEO_L476RG", "toolchains": "GCC_ARM", "libs": ["dsp", "fat", "rtos", "usb_host"] },
{ "target": "NUCLEO_L011K4", "toolchains": "GCC_ARM", "libs": ["dsp"] },
@ -194,6 +194,7 @@ linking_list = [
"toolchains": "GCC_ARM",
"tests": {"" : ["MBED_2", "MBED_10", "MBED_11", "MBED_16"],
"rtos" : ["RTOS_1", "RTOS_2", "RTOS_3"],
"usb" : ["USB_1", "USB_2" ,"USB_3", "USB_10", "USB_11"],
}
},
{"target": "NUCLEO_F429ZI",