STMCubeMX pinout changes
authorMichael McMaster <michael@codesrc.com>
Tue, 12 Nov 2019 10:32:01 +0000 (20:32 +1000)
committerMichael McMaster <michael@codesrc.com>
Tue, 12 Nov 2019 10:32:01 +0000 (20:32 +1000)
18 files changed:
STM32CubeMX/SCSI2SD-V6/.mxproject
STM32CubeMX/SCSI2SD-V6/Inc/mxconstants.h
STM32CubeMX/SCSI2SD-V6/Inc/spi.h [deleted file]
STM32CubeMX/SCSI2SD-V6/Inc/stm32f2xx_hal_conf.h
STM32CubeMX/SCSI2SD-V6/Inc/stm32f2xx_it.h
STM32CubeMX/SCSI2SD-V6/Inc/usart.h
STM32CubeMX/SCSI2SD-V6/Inc/usb_device.h
STM32CubeMX/SCSI2SD-V6/Inc/usbd_conf.h
STM32CubeMX/SCSI2SD-V6/Inc/usbd_desc.h
STM32CubeMX/SCSI2SD-V6/SCSI2SD-V6.ioc
STM32CubeMX/SCSI2SD-V6/Src/gpio.c
STM32CubeMX/SCSI2SD-V6/Src/main.c
STM32CubeMX/SCSI2SD-V6/Src/spi.c [deleted file]
STM32CubeMX/SCSI2SD-V6/Src/stm32f2xx_it.c
STM32CubeMX/SCSI2SD-V6/Src/usart.c
STM32CubeMX/SCSI2SD-V6/Src/usb_device.c
STM32CubeMX/SCSI2SD-V6/Src/usbd_conf.c
STM32CubeMX/SCSI2SD-V6/Src/usbd_desc.c

index c566edb405ff96f1e05ce56a8e9df0a2a2974d09..20f8dac8e62c9eeb84635a6201e5ae79f78a1ef5 100755 (executable)
@@ -1,14 +1,14 @@
 [PreviousGenFiles]
 HeaderPath=C:/Users/Michael/projects/SCSI2SD-V6/STM32CubeMX/SCSI2SD-V6/Inc
 SourcePath=C:/Users/Michael/projects/SCSI2SD-V6/STM32CubeMX/SCSI2SD-V6/Src
-SourceFiles=gpio.h;dma.h;ffconf.h;bsp_driver_sd.h;fatfs.h;fsmc.h;sdio.h;spi.h;tim.h;usart.h;usb_device.h;usbd_conf.h;usbd_desc.h;usbd_storage_if.h;usb_host.h;usbh_conf.h;stm32f2xx_it.h;stm32f2xx_hal_conf.h;mxconstants.h;gpio.c;dma.c;bsp_driver_sd.c;fatfs.c;fsmc.c;sdio.c;spi.c;tim.c;usart.c;usb_device.c;usbd_conf.c;usbd_desc.c;usbd_storage_if.c;usb_host.c;usbh_conf.c;stm32f2xx_it.c;stm32f2xx_hal_msp.c;main.c;sys.c;usb_otg_hs.c;
-HeaderFiles=gpio.h;dma.h;ffconf.h;bsp_driver_sd.h;fatfs.h;fsmc.h;sdio.h;spi.h;tim.h;usart.h;usb_device.h;usbd_conf.h;usbd_desc.h;usbd_storage_if.h;usb_host.h;usbh_conf.h;stm32f2xx_it.h;stm32f2xx_hal_conf.h;;sys.h;usb_otg_hs.h;mxconstants.h;
+SourceFiles=gpio.h;dma.h;ffconf.h;bsp_driver_sd.h;fatfs.h;fsmc.h;sdio.h;spi.h;tim.h;usart.h;usb_device.h;usbd_conf.h;usbd_desc.h;usbd_storage_if.h;usb_host.h;usbh_conf.h;stm32f2xx_it.h;stm32f2xx_hal_conf.h;mxconstants.h;gpio.c;dma.c;bsp_driver_sd.c;fatfs.c;fsmc.c;sdio.c;spi.c;tim.c;usart.c;usb_device.c;usbd_conf.c;usbd_desc.c;usbd_storage_if.c;usb_host.c;usbh_conf.c;stm32f2xx_it.c;stm32f2xx_hal_msp.c;main.c;sys.c;usb_otg_hs.c;usb_otg_fs.c;
+HeaderFiles=gpio.h;dma.h;ffconf.h;bsp_driver_sd.h;fatfs.h;fsmc.h;sdio.h;spi.h;tim.h;usart.h;usb_device.h;usbd_conf.h;usbd_desc.h;usbd_storage_if.h;usb_host.h;usbh_conf.h;stm32f2xx_it.h;stm32f2xx_hal_conf.h;;sys.h;usb_otg_hs.h;usb_otg_fs.h;mxconstants.h;
 
 [PreviousLibFiles]
-LibFiles=Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_gpio.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_gpio_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_dma_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_dma.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pcd_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pcd.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_usb.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_def.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_rcc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_rcc_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_cortex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_flash.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_flash_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pwr.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pwr_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_fsmc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_sram.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_sd.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_sdmmc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_spi.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_tim.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_tim_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_uart.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h;Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc/usbd_hid.h;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_fsmc.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sram.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sd.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_sdmmc.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_spi.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src/usbd_hid.c;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_gpio.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_gpio_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_dma_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_dma.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pcd_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pcd.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_usb.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_def.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_rcc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_rcc_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_cortex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_flash.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_flash_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pwr.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pwr_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_fsmc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_sram.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_sd.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_sdmmc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_spi.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_tim.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_tim_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_uart.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h;Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc/usbd_hid.h;Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f205xx.h;Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h;Drivers/CMSIS/Device/ST/STM32F2xx/Include/system_stm32f2xx.h;Drivers/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c;Drivers/CMSIS/Include/arm_common_tables.h;Drivers/CMSIS/Include/arm_const_structs.h;Drivers/CMSIS/Include/arm_math.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_cmFunc.h;Drivers/CMSIS/Include/core_cmInstr.h;Drivers/CMSIS/Include/core_cmSimd.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;
+LibFiles=Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_gpio.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_gpio_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_dma_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_dma.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pcd_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pcd.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_usb.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_def.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_rcc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_rcc_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_cortex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_flash.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_flash_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pwr.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pwr_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_fsmc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_sram.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_sd.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_sdmmc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_tim.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_tim_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_uart.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc.h;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_fsmc.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sram.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sd.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_sdmmc.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.c;Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_bot.c;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_data.c;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_gpio.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_gpio_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_dma_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_dma.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pcd_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pcd.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_usb.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_def.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_rcc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_rcc_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_cortex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_flash.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_flash_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pwr.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_pwr_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_fsmc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_sram.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_sd.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_ll_sdmmc.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_tim.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_tim_ex.h;Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal_uart.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc.h;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_bot.h;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_data.h;Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc/usbd_msc_scsi.h;Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f205xx.h;Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h;Drivers/CMSIS/Device/ST/STM32F2xx/Include/system_stm32f2xx.h;Drivers/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c;Drivers/CMSIS/Include/arm_common_tables.h;Drivers/CMSIS/Include/arm_const_structs.h;Drivers/CMSIS/Include/arm_math.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_cmFunc.h;Drivers/CMSIS/Include/core_cmInstr.h;Drivers/CMSIS/Include/core_cmSimd.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;
 
 [PreviousUsedTStudioFiles]
-HeaderPath=..\Drivers\STM32F2xx_HAL_Driver\Inc;..\Drivers\STM32F2xx_HAL_Driver\Inc\Legacy;..\Middlewares\ST\STM32_USB_Device_Library\Core\Inc;..\Middlewares\ST\STM32_USB_Device_Library\Class\HID\Inc;..\Drivers\CMSIS\Device\ST\STM32F2xx\Include;..\Drivers\CMSIS\Include;..\Inc;
-SourceFiles=..\Src\main.c;..\Src\gpio.c;..\Src\dma.c;..\Src\fsmc.c;..\Src\sdio.c;..\Src\spi.c;..\Src\sys.c;..\Src\tim.c;..\Src\usart.c;..\Src\usb_device.c;..\Src\usbd_conf.c;..\Src\usbd_desc.c;..\Src\stm32f2xx_it.c;..\Src\stm32f2xx_hal_msp.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_fsmc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sram.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sd.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_sdmmc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_spi.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src/usbd_hid.c;..\\Src/system_stm32f2xx.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_fsmc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sram.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sd.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_sdmmc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_spi.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src/usbd_hid.c;..\\Src/system_stm32f2xx.c;..\Drivers/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c;;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src/usbd_hid.c;
+HeaderPath=..\Drivers\STM32F2xx_HAL_Driver\Inc;..\Drivers\STM32F2xx_HAL_Driver\Inc\Legacy;..\Middlewares\ST\STM32_USB_Device_Library\Core\Inc;..\Middlewares\ST\STM32_USB_Device_Library\Class\MSC\Inc;..\Drivers\CMSIS\Device\ST\STM32F2xx\Include;..\Drivers\CMSIS\Include;..\Inc;
+SourceFiles=..\Src\main.c;..\Src\gpio.c;..\Src\dma.c;..\Src\fsmc.c;..\Src\sdio.c;..\Src\tim.c;..\Src\usart.c;..\Src\usb_device.c;..\Src\usbd_conf.c;..\Src\usbd_desc.c;..\Src\usbd_storage_if.c;..\Src\usb_otg_fs.c;..\Src\stm32f2xx_it.c;..\Src\stm32f2xx_hal_msp.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_fsmc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sram.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sd.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_sdmmc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_bot.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_data.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c;..\\Src/system_stm32f2xx.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_fsmc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sram.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_sd.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_sdmmc.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.c;..\Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_bot.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_data.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c;..\\Src/system_stm32f2xx.c;..\Drivers/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c;;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_bot.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_data.c;..\Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c;
 CDefines=__weak:__attribute__((weak));__packed:__attribute__((__packed__));USE_HAL_DRIVER;STM32F205xx;USE_HAL_DRIVER;USE_HAL_DRIVER;
 
index 592d30f1fdc2cff02f1478d7e4d2cae1a3082907..9f8f8240ce98bd5ed56ded73d8aeb75cdc815eef 100755 (executable)
 #define FPGA_GPIO2_GPIO_Port GPIOE
 #define FPGA_GPIO3_Pin GPIO_PIN_3
 #define FPGA_GPIO3_GPIO_Port GPIOE
-#define UNUSED_PE5_Pin GPIO_PIN_5
-#define UNUSED_PE5_GPIO_Port GPIOE
+#define USB_ID_PASSTHRU_Pin GPIO_PIN_5
+#define USB_ID_PASSTHRU_GPIO_Port GPIOE
 #define UNUSED_PE6_Pin GPIO_PIN_6
 #define UNUSED_PE6_GPIO_Port GPIOE
-#define UNUSED_PC13_Pin GPIO_PIN_13
-#define UNUSED_PC13_GPIO_Port GPIOC
-#define UNUSED_PC14_Pin GPIO_PIN_14
-#define UNUSED_PC14_GPIO_Port GPIOC
-#define UNUSED_PC15_Pin GPIO_PIN_15
-#define UNUSED_PC15_GPIO_Port GPIOC
-#define UNUSED_PC0_Pin GPIO_PIN_0
-#define UNUSED_PC0_GPIO_Port GPIOC
-#define UNUSED_PC1_Pin GPIO_PIN_1
-#define UNUSED_PC1_GPIO_Port GPIOC
-#define UNUSED_PC2_Pin GPIO_PIN_2
-#define UNUSED_PC2_GPIO_Port GPIOC
-#define UNUSED_PC3_Pin GPIO_PIN_3
-#define UNUSED_PC3_GPIO_Port GPIOC
-#define UNUSED_PA0_Pin GPIO_PIN_0
-#define UNUSED_PA0_GPIO_Port GPIOA
-#define UNUSED_PA1_Pin GPIO_PIN_1
-#define UNUSED_PA1_GPIO_Port GPIOA
-#define UNUSED_PA2_Pin GPIO_PIN_2
-#define UNUSED_PA2_GPIO_Port GPIOA
-#define UNUSED_PA3_Pin GPIO_PIN_3
-#define UNUSED_PA3_GPIO_Port GPIOA
+#define nULPI_RESET_Pin GPIO_PIN_2
+#define nULPI_RESET_GPIO_Port GPIOA
 #define nSPICFG_CS_Pin GPIO_PIN_4
 #define nSPICFG_CS_GPIO_Port GPIOA
-#define UNUSED_PC4_Pin GPIO_PIN_4
-#define UNUSED_PC4_GPIO_Port GPIOC
-#define UNUSED_PC5_Pin GPIO_PIN_5
-#define UNUSED_PC5_GPIO_Port GPIOC
-#define LED_Pin GPIO_PIN_0
-#define LED_GPIO_Port GPIOB
-#define nTERM_EN_Pin GPIO_PIN_1
-#define nTERM_EN_GPIO_Port GPIOB
+#define VER_ID1_Pin GPIO_PIN_4
+#define VER_ID1_GPIO_Port GPIOC
+#define VER_ID2_Pin GPIO_PIN_5
+#define VER_ID2_GPIO_Port GPIOC
 #define BOOT1_Pin GPIO_PIN_2
 #define BOOT1_GPIO_Port GPIOB
-#define UNUSED_PB12_Pin GPIO_PIN_12
-#define UNUSED_PB12_GPIO_Port GPIOB
-#define UNUSED_PB13_Pin GPIO_PIN_13
-#define UNUSED_PB13_GPIO_Port GPIOB
-#define UNUSED_PD11_Pin GPIO_PIN_11
-#define UNUSED_PD11_GPIO_Port GPIOD
+#define nTERM_EN_Pin GPIO_PIN_14
+#define nTERM_EN_GPIO_Port GPIOB
+#define LED_IO_Pin GPIO_PIN_15
+#define LED_IO_GPIO_Port GPIOB
 #define FPGA_RST_Pin GPIO_PIN_13
 #define FPGA_RST_GPIO_Port GPIOD
 #define nFGPA_CRESET_B_Pin GPIO_PIN_6
 #define nFGPA_CRESET_B_GPIO_Port GPIOC
 #define nFGPA_CDONE_Pin GPIO_PIN_7
 #define nFGPA_CDONE_GPIO_Port GPIOC
+#define OTG_FS_VBUS_UNUSED_Pin GPIO_PIN_9
+#define OTG_FS_VBUS_UNUSED_GPIO_Port GPIOA
 #define FSMC_UNUSED_CLK_Pin GPIO_PIN_3
 #define FSMC_UNUSED_CLK_GPIO_Port GPIOD
-#define UNUSED_PB5_Pin GPIO_PIN_5
-#define UNUSED_PB5_GPIO_Port GPIOB
-#define UNUSED_PB6_Pin GPIO_PIN_6
-#define UNUSED_PB6_GPIO_Port GPIOB
+#define NWAIT_UNUSED_Pin GPIO_PIN_6
+#define NWAIT_UNUSED_GPIO_Port GPIOD
 #define nSD_WP_Pin GPIO_PIN_8
 #define nSD_WP_GPIO_Port GPIOB
 #define nSD_CD_Pin GPIO_PIN_9
diff --git a/STM32CubeMX/SCSI2SD-V6/Inc/spi.h b/STM32CubeMX/SCSI2SD-V6/Inc/spi.h
deleted file mode 100755 (executable)
index 7b6ef32..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
-  ******************************************************************************
-  * File Name          : SPI.h
-  * Description        : This file provides code for the configuration
-  *                      of the SPI instances.
-  ******************************************************************************
-  *
-  * COPYRIGHT(c) 2019 STMicroelectronics
-  *
-  * Redistribution and use in source and binary forms, with or without modification,
-  * are permitted provided that the following conditions are met:
-  *   1. Redistributions of source code must retain the above copyright notice,
-  *      this list of conditions and the following disclaimer.
-  *   2. Redistributions in binary form must reproduce the above copyright notice,
-  *      this list of conditions and the following disclaimer in the documentation
-  *      and/or other materials provided with the distribution.
-  *   3. Neither the name of STMicroelectronics nor the names of its contributors
-  *      may be used to endorse or promote products derived from this software
-  *      without specific prior written permission.
-  *
-  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  *
-  ******************************************************************************
-  */
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __spi_H
-#define __spi_H
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f2xx_hal.h"
-
-/* USER CODE BEGIN Includes */
-
-/* USER CODE END Includes */
-
-extern SPI_HandleTypeDef hspi1;
-
-/* USER CODE BEGIN Private defines */
-
-/* USER CODE END Private defines */
-
-void MX_SPI1_Init(void);
-
-/* USER CODE BEGIN Prototypes */
-
-/* USER CODE END Prototypes */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /*__ spi_H */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
index ef23c94f0f01f5f0f80b9da501907bc2af22f051..f1a4d66e11ff83f652c660ddbb1749dd25d7cb37 100755 (executable)
@@ -68,7 +68,7 @@
 //#define HAL_RNG_MODULE_ENABLED   
 //#define HAL_RTC_MODULE_ENABLED   
 #define HAL_SD_MODULE_ENABLED
-#define HAL_SPI_MODULE_ENABLED
+//#define HAL_SPI_MODULE_ENABLED   
 #define HAL_TIM_MODULE_ENABLED
 #define HAL_UART_MODULE_ENABLED
 //#define HAL_USART_MODULE_ENABLED   
index a2efe1f724387a22bc3b07362b4b52a9b52847b2..5c39a9d7beced68e97af055eda859880643f769d 100755 (executable)
@@ -49,8 +49,8 @@ void SysTick_Handler(void);
 void EXTI4_IRQHandler(void);
 void SDIO_IRQHandler(void);
 void DMA2_Stream3_IRQHandler(void);
-void OTG_FS_IRQHandler(void);
 void DMA2_Stream6_IRQHandler(void);
+void OTG_HS_IRQHandler(void);
 
 #ifdef __cplusplus
 }
index bffa9a54f5a5bd44c031d7a20adffb4a934744dd..a51e2b84cf69d21f9889802dbd5c7a9210caa27e 100755 (executable)
 
 /* USER CODE END Includes */
 
-extern UART_HandleTypeDef huart3;
+extern UART_HandleTypeDef huart4;
 
 /* USER CODE BEGIN Private defines */
 
 /* USER CODE END Private defines */
 
-void MX_USART3_UART_Init(void);
+void MX_UART4_Init(void);
 
 /* USER CODE BEGIN Prototypes */
 
index 4ccb62163837a0eea9f61664e94c7ba3313e0ab5..dd6f28671da281ddd3416f393e1f38b3c8df3324 100755 (executable)
@@ -42,7 +42,7 @@
 #include "stm32f2xx_hal.h"
 #include "usbd_def.h"
 
-extern USBD_HandleTypeDef hUsbDeviceFS;
+extern USBD_HandleTypeDef hUsbDeviceHS;
 
 /* USB_Device init function */ 
 void MX_USB_DEVICE_Init(void);
index b4dd875e24efb9834bdb4c8d50845f9b652cd3fe..a3c561879910d56a07ad981f671ed60d14fde5a5 100755 (executable)
@@ -57,7 +57,7 @@
   */ 
 
 /*---------- -----------*/
-#define USBD_MAX_NUM_INTERFACES     2
+#define USBD_MAX_NUM_INTERFACES     1
 /*---------- -----------*/
 #define USBD_MAX_NUM_CONFIGURATION     1
 /*---------- -----------*/
@@ -70,6 +70,8 @@
 #define USBD_LPM_ENABLED     0
 /*---------- -----------*/
 #define USBD_SELF_POWERED     1
+/*---------- -----------*/
+#define MSC_MEDIA_PACKET     512
 
 /****************************************/
 /* #define for FS and HS identification */
index 50dfc6fc94b3abb508a8830859ee79ad4d6b16d8..a70366881d0f09104774e2601790b5306544bad0 100755 (executable)
@@ -75,7 +75,7 @@
 /** @defgroup USBD_DESC_Exported_Variables
   * @{
   */ 
-extern USBD_DescriptorsTypeDef FS_Desc;
+extern USBD_DescriptorsTypeDef HS_Desc;
 /**
   * @}
   */ 
index 3516c750e56732654dc38b5c13a3a22910534f1e..8529fe119ff335efc34698716575f7a7c3dd8fc3 100755 (executable)
@@ -67,16 +67,15 @@ KeepUserPlacement=true
 Mcu.Family=STM32F2
 Mcu.IP0=DMA
 Mcu.IP1=FSMC
-Mcu.IP10=USB_OTG_FS
 Mcu.IP2=NVIC
 Mcu.IP3=RCC
 Mcu.IP4=SDIO
-Mcu.IP5=SPI1
-Mcu.IP6=SYS
-Mcu.IP7=TIM4
-Mcu.IP8=USART3
-Mcu.IP9=USB_DEVICE
-Mcu.IPNb=11
+Mcu.IP5=TIM4
+Mcu.IP6=UART4
+Mcu.IP7=USB_DEVICE
+Mcu.IP8=USB_OTG_FS
+Mcu.IP9=USB_OTG_HS
+Mcu.IPNb=10
 Mcu.Name=STM32F205V(B-C-E-F-G)Tx
 Mcu.Package=LQFP100
 Mcu.Pin0=PE2
@@ -148,21 +147,22 @@ Mcu.Pin68=PD3
 Mcu.Pin69=PD4
 Mcu.Pin7=PC15-OSC32_OUT
 Mcu.Pin70=PD5
-Mcu.Pin71=PD7
-Mcu.Pin72=PB3
-Mcu.Pin73=PB4
-Mcu.Pin74=PB5
-Mcu.Pin75=PB6
-Mcu.Pin76=PB7
-Mcu.Pin77=PB8
-Mcu.Pin78=PB9
-Mcu.Pin79=PE0
+Mcu.Pin71=PD6
+Mcu.Pin72=PD7
+Mcu.Pin73=PB3
+Mcu.Pin74=PB4
+Mcu.Pin75=PB5
+Mcu.Pin76=PB6
+Mcu.Pin77=PB7
+Mcu.Pin78=PB8
+Mcu.Pin79=PB9
 Mcu.Pin8=PH0-OSC_IN
-Mcu.Pin80=PE1
-Mcu.Pin81=VP_TIM4_VS_ControllerModeClock
-Mcu.Pin82=VP_USB_DEVICE_VS_USB_DEVICE_HID_FS
+Mcu.Pin80=PE0
+Mcu.Pin81=PE1
+Mcu.Pin82=VP_TIM4_VS_ControllerModeClock
+Mcu.Pin83=VP_USB_DEVICE_VS_USB_DEVICE_MSC_HS
 Mcu.Pin9=PH1-OSC_OUT
-Mcu.PinsNb=83
+Mcu.PinsNb=84
 Mcu.ThirdPartyNb=0
 Mcu.UserConstants=
 Mcu.UserName=STM32F205VCTx
@@ -172,116 +172,95 @@ NVIC.DMA2_Stream3_IRQn=true\:0\:0\:false\:false\:true\:true\:true
 NVIC.DMA2_Stream6_IRQn=true\:0\:0\:false\:false\:true\:true\:true
 NVIC.EXTI4_IRQn=true\:10\:0\:true\:false\:true\:true\:true
 NVIC.ForceEnableDMAVector=true
-NVIC.OTG_FS_IRQn=true\:0\:0\:false\:false\:true\:true\:true
+NVIC.OTG_HS_IRQn=true\:0\:0\:false\:false\:true\:false\:true
 NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
 NVIC.SDIO_IRQn=true\:0\:0\:true\:false\:true\:true\:true
 NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:true\:true
-PA0-WKUP.GPIOParameters=GPIO_PuPd,GPIO_Label
-PA0-WKUP.GPIO_Label=UNUSED_PA0
-PA0-WKUP.GPIO_PuPd=GPIO_PULLDOWN
 PA0-WKUP.Locked=true
-PA0-WKUP.Signal=GPIO_Input
-PA1.GPIOParameters=GPIO_PuPd,GPIO_Label
-PA1.GPIO_Label=UNUSED_PA1
-PA1.GPIO_PuPd=GPIO_PULLDOWN
+PA0-WKUP.Mode=Asynchronous
+PA0-WKUP.Signal=UART4_TX
 PA1.Locked=true
-PA1.Signal=GPIO_Input
-PA10.GPIOParameters=GPIO_PuPd
-PA10.GPIO_PuPd=GPIO_PULLDOWN
+PA1.Mode=Asynchronous
+PA1.Signal=UART4_RX
 PA10.Locked=true
-PA10.Signal=GPIO_Input
+PA10.Signal=USB_OTG_FS_ID
 PA11.Mode=Device_Only
 PA11.Signal=USB_OTG_FS_DM
 PA12.Mode=Device_Only
 PA12.Signal=USB_OTG_FS_DP
-PA13.Mode=JTAG(5-pin)
+PA13.Locked=true
 PA13.Signal=SYS_JTMS-SWDIO
-PA14.Mode=JTAG(5-pin)
+PA14.Locked=true
 PA14.Signal=SYS_JTCK-SWCLK
-PA15.Mode=JTAG(5-pin)
+PA15.Locked=true
 PA15.Signal=SYS_JTDI
 PA2.GPIOParameters=GPIO_PuPd,GPIO_Label
-PA2.GPIO_Label=UNUSED_PA2
-PA2.GPIO_PuPd=GPIO_PULLDOWN
+PA2.GPIO_Label=nULPI_RESET
+PA2.GPIO_PuPd=GPIO_NOPULL
 PA2.Locked=true
-PA2.Signal=GPIO_Input
-PA3.GPIOParameters=GPIO_PuPd,GPIO_Label
-PA3.GPIO_Label=UNUSED_PA3
-PA3.GPIO_PuPd=GPIO_PULLDOWN
+PA2.Signal=GPIO_Output
 PA3.Locked=true
-PA3.Signal=GPIO_Input
+PA3.Mode=Device_HS
+PA3.Signal=USB_OTG_HS_ULPI_D0
 PA4.GPIOParameters=GPIO_Label
 PA4.GPIO_Label=nSPICFG_CS
 PA4.Locked=true
 PA4.Signal=GPIO_Output
-PA5.Mode=Full_Duplex_Master
-PA5.Signal=SPI1_SCK
-PA6.Mode=Full_Duplex_Master
+PA5.Locked=true
+PA5.Mode=Device_HS
+PA5.Signal=USB_OTG_HS_ULPI_CK
+PA6.Locked=true
 PA6.Signal=SPI1_MISO
-PA7.Mode=Full_Duplex_Master
+PA7.Locked=true
 PA7.Signal=SPI1_MOSI
 PA8.GPIOParameters=GPIO_Speed
 PA8.GPIO_Speed=GPIO_SPEED_HIGH
 PA8.Mode=Clock-out-1
 PA8.Signal=RCC_MCO_1
-PA9.Mode=Activate_VBUS
-PA9.Signal=USB_OTG_FS_VBUS
-PB0.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultOutputPP
-PB0.GPIO_Label=LED
-PB0.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_PP
-PB0.GPIO_PuPd=GPIO_PULLDOWN
+PA9.GPIOParameters=GPIO_Label
+PA9.GPIO_Label=OTG_FS_VBUS_UNUSED
+PA9.Locked=true
+PA9.Signal=GPIO_Analog
 PB0.Locked=true
-PB0.Signal=GPIO_Output
-PB1.GPIOParameters=GPIO_PuPd,GPIO_Label
-PB1.GPIO_Label=nTERM_EN
-PB1.GPIO_PuPd=GPIO_NOPULL
+PB0.Mode=Device_HS
+PB0.Signal=USB_OTG_HS_ULPI_D1
 PB1.Locked=true
-PB1.Signal=GPIO_Output
+PB1.Mode=Device_HS
+PB1.Signal=USB_OTG_HS_ULPI_D2
 PB10.Locked=true
-PB10.Mode=Asynchronous
-PB10.Signal=USART3_TX
+PB10.Mode=Device_HS
+PB10.Signal=USB_OTG_HS_ULPI_D3
 PB11.Locked=true
-PB11.Mode=Asynchronous
-PB11.Signal=USART3_RX
-PB12.GPIOParameters=GPIO_PuPd,GPIO_Label
-PB12.GPIO_Label=UNUSED_PB12
-PB12.GPIO_PuPd=GPIO_PULLDOWN
+PB11.Mode=Device_HS
+PB11.Signal=USB_OTG_HS_ULPI_D4
 PB12.Locked=true
-PB12.Signal=GPIO_Input
-PB13.GPIOParameters=GPIO_PuPd,GPIO_Label
-PB13.GPIO_Label=UNUSED_PB13
-PB13.GPIO_PuPd=GPIO_PULLDOWN
+PB12.Mode=Device_HS
+PB12.Signal=USB_OTG_HS_ULPI_D5
 PB13.Locked=true
-PB13.Signal=GPIO_Input
-PB14.GPIOParameters=GPIO_PuPd,GPIO_Mode
-PB14.GPIO_Mode=GPIO_MODE_INPUT
-PB14.GPIO_PuPd=GPIO_PULLDOWN
+PB13.Mode=Device_HS
+PB13.Signal=USB_OTG_HS_ULPI_D6
+PB14.GPIOParameters=GPIO_Label
+PB14.GPIO_Label=nTERM_EN
 PB14.Locked=true
-PB14.Signal=GPIO_Input
-PB15.GPIOParameters=GPIO_PuPd,GPIO_Mode
-PB15.GPIO_Mode=GPIO_MODE_INPUT
-PB15.GPIO_PuPd=GPIO_PULLDOWN
+PB14.Signal=GPIO_Output
+PB15.GPIOParameters=GPIO_Label
+PB15.GPIO_Label=LED_IO
 PB15.Locked=true
-PB15.Signal=GPIO_Input
+PB15.Signal=GPIO_Output
 PB2.GPIOParameters=GPIO_PuPd,GPIO_Label
 PB2.GPIO_Label=BOOT1
 PB2.GPIO_PuPd=GPIO_PULLDOWN
 PB2.Locked=true
 PB2.Signal=GPIO_Input
-PB3.Mode=JTAG(5-pin)
-PB3.Signal=SYS_JTDO-SWO
-PB4.Mode=JTAG(5-pin)
+PB3.Locked=true
+PB3.Signal=SPI1_SCK
+PB4.Locked=true
 PB4.Signal=SYS_JTRST
-PB5.GPIOParameters=GPIO_PuPd,GPIO_Label
-PB5.GPIO_Label=UNUSED_PB5
-PB5.GPIO_PuPd=GPIO_PULLDOWN
 PB5.Locked=true
-PB5.Signal=GPIO_Input
-PB6.GPIOParameters=GPIO_PuPd,GPIO_Label
-PB6.GPIO_Label=UNUSED_PB6
-PB6.GPIO_PuPd=GPIO_PULLDOWN
+PB5.Mode=Device_HS
+PB5.Signal=USB_OTG_HS_ULPI_D7
 PB6.Locked=true
-PB6.Signal=GPIO_Input
+PB6.Signal=GPIO_Analog
 PB7.GPIOParameters=GPIO_Speed_High_Default
 PB7.GPIO_Speed_High_Default=GPIO_SPEED_MEDIUM
 PB7.Signal=FSMC_NL
@@ -295,16 +274,11 @@ PB9.GPIO_Label=nSD_CD
 PB9.GPIO_PuPd=GPIO_PULLUP
 PB9.Locked=true
 PB9.Signal=GPIO_Input
-PC0.GPIOParameters=GPIO_PuPd,GPIO_Label
-PC0.GPIO_Label=UNUSED_PC0
-PC0.GPIO_PuPd=GPIO_PULLDOWN
 PC0.Locked=true
-PC0.Signal=GPIO_Input
-PC1.GPIOParameters=GPIO_PuPd,GPIO_Label
-PC1.GPIO_Label=UNUSED_PC1
-PC1.GPIO_PuPd=GPIO_PULLDOWN
+PC0.Mode=Device_HS
+PC0.Signal=USB_OTG_HS_ULPI_STP
 PC1.Locked=true
-PC1.Signal=GPIO_Input
+PC1.Signal=GPIO_Analog
 PC10.GPIOParameters=GPIO_PuPd
 PC10.GPIO_PuPd=GPIO_PULLUP
 PC10.Mode=SD_4_bits_Wide_bus
@@ -315,39 +289,26 @@ PC11.Mode=SD_4_bits_Wide_bus
 PC11.Signal=SDIO_D3
 PC12.Mode=SD_4_bits_Wide_bus
 PC12.Signal=SDIO_CK
-PC13.GPIOParameters=GPIO_PuPd,GPIO_Label
-PC13.GPIO_Label=UNUSED_PC13
-PC13.GPIO_PuPd=GPIO_PULLDOWN
 PC13.Locked=true
-PC13.Signal=GPIO_Input
-PC14-OSC32_IN.GPIOParameters=GPIO_PuPd,GPIO_Label
-PC14-OSC32_IN.GPIO_Label=UNUSED_PC14
-PC14-OSC32_IN.GPIO_PuPd=GPIO_PULLDOWN
+PC13.Signal=GPIO_Analog
 PC14-OSC32_IN.Locked=true
-PC14-OSC32_IN.Signal=GPIO_Input
-PC15-OSC32_OUT.GPIOParameters=GPIO_PuPd,GPIO_Label
-PC15-OSC32_OUT.GPIO_Label=UNUSED_PC15
-PC15-OSC32_OUT.GPIO_PuPd=GPIO_PULLDOWN
+PC14-OSC32_IN.Signal=GPIO_Analog
 PC15-OSC32_OUT.Locked=true
-PC15-OSC32_OUT.Signal=GPIO_Input
-PC2.GPIOParameters=GPIO_PuPd,GPIO_Label
-PC2.GPIO_Label=UNUSED_PC2
-PC2.GPIO_PuPd=GPIO_PULLDOWN
+PC15-OSC32_OUT.Signal=GPIO_Analog
 PC2.Locked=true
-PC2.Signal=GPIO_Input
-PC3.GPIOParameters=GPIO_PuPd,GPIO_Label
-PC3.GPIO_Label=UNUSED_PC3
-PC3.GPIO_PuPd=GPIO_PULLDOWN
+PC2.Mode=Device_HS
+PC2.Signal=USB_OTG_HS_ULPI_DIR
 PC3.Locked=true
-PC3.Signal=GPIO_Input
+PC3.Mode=Device_HS
+PC3.Signal=USB_OTG_HS_ULPI_NXT
 PC4.GPIOParameters=GPIO_PuPd,GPIO_Label
-PC4.GPIO_Label=UNUSED_PC4
-PC4.GPIO_PuPd=GPIO_PULLDOWN
+PC4.GPIO_Label=VER_ID1
+PC4.GPIO_PuPd=GPIO_PULLUP
 PC4.Locked=true
 PC4.Signal=GPIO_Input
 PC5.GPIOParameters=GPIO_PuPd,GPIO_Label
-PC5.GPIO_Label=UNUSED_PC5
-PC5.GPIO_PuPd=GPIO_PULLDOWN
+PC5.GPIO_Label=VER_ID2
+PC5.GPIO_PuPd=GPIO_PULLUP
 PC5.Locked=true
 PC5.Signal=GPIO_Input
 PC6.GPIOParameters=GPIO_PuPd,GPIO_Label
@@ -380,11 +341,8 @@ PD10.GPIOParameters=GPIO_Speed_High_Default
 PD10.GPIO_Speed_High_Default=GPIO_SPEED_MEDIUM
 PD10.Mode=16b-da1
 PD10.Signal=FSMC_DA15
-PD11.GPIOParameters=GPIO_PuPd,GPIO_Label
-PD11.GPIO_Label=UNUSED_PD11
-PD11.GPIO_PuPd=GPIO_PULLDOWN
 PD11.Locked=true
-PD11.Signal=GPIO_Input
+PD11.Signal=GPIO_Analog
 PD12.Locked=true
 PD12.Signal=S_TIM4_CH1
 PD13.GPIOParameters=GPIO_PuPd,GPIO_Label
@@ -417,6 +375,10 @@ PD5.GPIOParameters=GPIO_Speed_High_Default
 PD5.GPIO_Speed_High_Default=GPIO_SPEED_MEDIUM
 PD5.Mode=MuxedPsram1
 PD5.Signal=FSMC_NWE
+PD6.GPIOParameters=GPIO_Label
+PD6.GPIO_Label=NWAIT_UNUSED
+PD6.Locked=true
+PD6.Signal=GPIO_Analog
 PD7.GPIOParameters=GPIO_Speed_High_Default
 PD7.GPIO_Speed_High_Default=GPIO_SPEED_MEDIUM
 PD7.Mode=NorPsramChipSelect1_1
@@ -473,11 +435,10 @@ PE3.Locked=true
 PE3.Signal=GPIO_Input
 PE4.Locked=true
 PE4.Signal=GPXTI4
-PE5.GPIOParameters=GPIO_PuPd,GPIO_Label
-PE5.GPIO_Label=UNUSED_PE5
-PE5.GPIO_PuPd=GPIO_PULLDOWN
+PE5.GPIOParameters=GPIO_Label
+PE5.GPIO_Label=USB_ID_PASSTHRU
 PE5.Locked=true
-PE5.Signal=GPIO_Input
+PE5.Signal=GPIO_Analog
 PE6.GPIOParameters=GPIO_PuPd,GPIO_Label
 PE6.GPIO_Label=UNUSED_PE6
 PE6.GPIO_PuPd=GPIO_PULLDOWN
@@ -568,24 +529,20 @@ SH.GPXTI4.0=GPIO_EXTI4
 SH.GPXTI4.ConfNb=1
 SH.S_TIM4_CH1.0=TIM4_CH1,TriggerSource_TI1FP1
 SH.S_TIM4_CH1.ConfNb=1
-SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_4
-SPI1.CLKPhase=SPI_PHASE_2EDGE
-SPI1.CLKPolarity=SPI_POLARITY_HIGH
-SPI1.CalculateBaudRate=13.5 MBits/s
-SPI1.IPParameters=Mode,CalculateBaudRate,BaudRatePrescaler,CLKPolarity,CLKPhase,VirtualType
-SPI1.Mode=SPI_MODE_MASTER
-SPI1.VirtualType=VM_MASTER
-USART3.IPParameters=VirtualMode
-USART3.VirtualMode=VM_ASYNC
-USB_DEVICE.IPParameters=VirtualMode-HID_FS,VirtualModeFS,USBD_HandleTypeDef-HID_FS,USBD_MAX_NUM_INTERFACES-HID_FS
-USB_DEVICE.USBD_HandleTypeDef-HID_FS=hUsbDeviceFS
-USB_DEVICE.USBD_MAX_NUM_INTERFACES-HID_FS=2
-USB_DEVICE.VirtualMode-HID_FS=Hid
-USB_DEVICE.VirtualModeFS=Hid_FS
+UART4.BaudRate=9600
+UART4.IPParameters=VirtualMode,BaudRate
+UART4.VirtualMode=Asynchronous
+USB_DEVICE.IPParameters=VirtualMode-MSC_HS,USBD_HandleTypeDef-MSC_HS,VirtualModeHS
+USB_DEVICE.USBD_HandleTypeDef-MSC_HS=hUsbDeviceHS
+USB_DEVICE.VirtualMode-MSC_HS=Msc
+USB_DEVICE.VirtualModeHS=Msc_HS
 USB_OTG_FS.IPParameters=VirtualMode
 USB_OTG_FS.VirtualMode=Device_Only
+USB_OTG_HS.IPParameters=VirtualMode-Device_HS,dma_enable-Device_HS
+USB_OTG_HS.VirtualMode-Device_HS=Device_HS
+USB_OTG_HS.dma_enable-Device_HS=ENABLE
 VP_TIM4_VS_ControllerModeClock.Mode=Clock Mode
 VP_TIM4_VS_ControllerModeClock.Signal=TIM4_VS_ControllerModeClock
-VP_USB_DEVICE_VS_USB_DEVICE_HID_FS.Mode=HID_FS
-VP_USB_DEVICE_VS_USB_DEVICE_HID_FS.Signal=USB_DEVICE_VS_USB_DEVICE_HID_FS
+VP_USB_DEVICE_VS_USB_DEVICE_MSC_HS.Mode=MSC_HS
+VP_USB_DEVICE_VS_USB_DEVICE_MSC_HS.Signal=USB_DEVICE_VS_USB_DEVICE_MSC_HS
 board=SCSI2SD-V6
index 21529ffdf1cff5584a95d367892ccc51c2f7d000..8fb5ca3dbc54ff56e53f58255a9e2f725727ab32 100755 (executable)
         * EXTI
         * Free pins are configured automatically as Analog (this feature is enabled through 
         * the Code Generation settings)
+     PA6   ------> SPI1_MISO
+     PA7   ------> SPI1_MOSI
      PA8   ------> RCC_MCO_1
+     PB3   ------> SPI1_SCK
 */
 void MX_GPIO_Init(void)
 {
@@ -68,8 +71,8 @@ void MX_GPIO_Init(void)
   __GPIOB_CLK_ENABLE();
   __GPIOD_CLK_ENABLE();
 
-  /*Configure GPIO pins : PEPin PEPin PEPin */
-  GPIO_InitStruct.Pin = FPGA_GPIO2_Pin|UNUSED_PE5_Pin|UNUSED_PE6_Pin;
+  /*Configure GPIO pins : PEPin PEPin */
+  GPIO_InitStruct.Pin = FPGA_GPIO2_Pin|UNUSED_PE6_Pin;
   GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
   GPIO_InitStruct.Pull = GPIO_PULLDOWN;
   HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
@@ -86,57 +89,56 @@ void MX_GPIO_Init(void)
   GPIO_InitStruct.Pull = GPIO_NOPULL;
   HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
 
-  /*Configure GPIO pins : PCPin PCPin PCPin PCPin 
-                           PCPin PCPin PCPin PCPin 
-                           PCPin */
-  GPIO_InitStruct.Pin = UNUSED_PC13_Pin|UNUSED_PC14_Pin|UNUSED_PC15_Pin|UNUSED_PC0_Pin 
-                          |UNUSED_PC1_Pin|UNUSED_PC2_Pin|UNUSED_PC3_Pin|UNUSED_PC4_Pin 
-                          |UNUSED_PC5_Pin;
-  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-  GPIO_InitStruct.Pull = GPIO_PULLDOWN;
-  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
+  /*Configure GPIO pin : PtPin */
+  GPIO_InitStruct.Pin = USB_ID_PASSTHRU_Pin;
+  GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
+  GPIO_InitStruct.Pull = GPIO_NOPULL;
+  HAL_GPIO_Init(USB_ID_PASSTHRU_GPIO_Port, &GPIO_InitStruct);
 
-  /*Configure GPIO pins : PAPin PAPin PAPin PAPin 
-                           PA10 */
-  GPIO_InitStruct.Pin = UNUSED_PA0_Pin|UNUSED_PA1_Pin|UNUSED_PA2_Pin|UNUSED_PA3_Pin 
-                          |GPIO_PIN_10;
-  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-  GPIO_InitStruct.Pull = GPIO_PULLDOWN;
-  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+  /*Configure GPIO pins : PC13 PC14 PC15 PC1 */
+  GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15|GPIO_PIN_1;
+  GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
+  GPIO_InitStruct.Pull = GPIO_NOPULL;
+  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
 
-  /*Configure GPIO pin : PtPin */
-  GPIO_InitStruct.Pin = nSPICFG_CS_Pin;
+  /*Configure GPIO pins : PAPin PAPin */
+  GPIO_InitStruct.Pin = nULPI_RESET_Pin|nSPICFG_CS_Pin;
   GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
   GPIO_InitStruct.Pull = GPIO_NOPULL;
   GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
-  HAL_GPIO_Init(nSPICFG_CS_GPIO_Port, &GPIO_InitStruct);
+  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+
+  /*Configure GPIO pins : PA6 PA7 */
+  GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
+  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+  GPIO_InitStruct.Pull = GPIO_NOPULL;
+  GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
+  GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
+  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+
+  /*Configure GPIO pins : PCPin PCPin */
+  GPIO_InitStruct.Pin = VER_ID1_Pin|VER_ID2_Pin;
+  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+  GPIO_InitStruct.Pull = GPIO_PULLUP;
+  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
 
   /*Configure GPIO pin : PtPin */
-  GPIO_InitStruct.Pin = LED_Pin;
-  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
+  GPIO_InitStruct.Pin = BOOT1_Pin;
+  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
   GPIO_InitStruct.Pull = GPIO_PULLDOWN;
-  GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
-  HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct);
+  HAL_GPIO_Init(BOOT1_GPIO_Port, &GPIO_InitStruct);
 
-  /*Configure GPIO pin : PtPin */
-  GPIO_InitStruct.Pin = nTERM_EN_Pin;
+  /*Configure GPIO pins : PBPin PBPin */
+  GPIO_InitStruct.Pin = nTERM_EN_Pin|LED_IO_Pin;
   GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
   GPIO_InitStruct.Pull = GPIO_NOPULL;
   GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
-  HAL_GPIO_Init(nTERM_EN_GPIO_Port, &GPIO_InitStruct);
-
-  /*Configure GPIO pins : PBPin PBPin PBPin PB14 
-                           PB15 PBPin PBPin */
-  GPIO_InitStruct.Pin = BOOT1_Pin|UNUSED_PB12_Pin|UNUSED_PB13_Pin|GPIO_PIN_14 
-                          |GPIO_PIN_15|UNUSED_PB5_Pin|UNUSED_PB6_Pin;
-  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-  GPIO_InitStruct.Pull = GPIO_PULLDOWN;
   HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
 
-  /*Configure GPIO pins : PDPin PDPin */
-  GPIO_InitStruct.Pin = UNUSED_PD11_Pin|FSMC_UNUSED_CLK_Pin;
-  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-  GPIO_InitStruct.Pull = GPIO_PULLDOWN;
+  /*Configure GPIO pins : PD11 PDPin */
+  GPIO_InitStruct.Pin = GPIO_PIN_11|NWAIT_UNUSED_Pin;
+  GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
+  GPIO_InitStruct.Pull = GPIO_NOPULL;
   HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
 
   /*Configure GPIO pin : PtPin */
@@ -160,11 +162,31 @@ void MX_GPIO_Init(void)
   GPIO_InitStruct.Alternate = GPIO_AF0_MCO;
   HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
 
-  /*Configure GPIO pin : PD6 */
+  /*Configure GPIO pin : PtPin */
+  GPIO_InitStruct.Pin = OTG_FS_VBUS_UNUSED_Pin;
+  GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
+  GPIO_InitStruct.Pull = GPIO_NOPULL;
+  HAL_GPIO_Init(OTG_FS_VBUS_UNUSED_GPIO_Port, &GPIO_InitStruct);
+
+  /*Configure GPIO pin : PtPin */
+  GPIO_InitStruct.Pin = FSMC_UNUSED_CLK_Pin;
+  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+  GPIO_InitStruct.Pull = GPIO_PULLDOWN;
+  HAL_GPIO_Init(FSMC_UNUSED_CLK_GPIO_Port, &GPIO_InitStruct);
+
+  /*Configure GPIO pin : PB3 */
+  GPIO_InitStruct.Pin = GPIO_PIN_3;
+  GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+  GPIO_InitStruct.Pull = GPIO_NOPULL;
+  GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
+  GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
+  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+
+  /*Configure GPIO pin : PB6 */
   GPIO_InitStruct.Pin = GPIO_PIN_6;
   GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
   GPIO_InitStruct.Pull = GPIO_NOPULL;
-  HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
+  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
 
   /*Configure GPIO pins : PBPin PBPin */
   GPIO_InitStruct.Pin = nSD_WP_Pin|nSD_CD_Pin;
index 48e1f9ab931ab459d3286b58e0f31f0f40081f41..bbfd59c3f30ef2354b9a3b443687d36a4dc45c5c 100755 (executable)
 #include "stm32f2xx_hal.h"
 #include "dma.h"
 #include "sdio.h"
-#include "spi.h"
 #include "tim.h"
 #include "usart.h"
 #include "usb_device.h"
+#include "usb_otg_fs.h"
 #include "gpio.h"
 #include "fsmc.h"
 
@@ -91,10 +91,10 @@ int main(void)
   SystemClock_Config();
   MX_FSMC_Init();
   MX_SDIO_SD_Init();
-  MX_SPI1_Init();
   MX_TIM4_Init();
-  MX_USART3_UART_Init();
   MX_USB_DEVICE_Init();
+  MX_UART4_Init();
+  MX_USB_OTG_FS_PCD_Init();
 
   /* USER CODE BEGIN 2 */
   mainInit();
diff --git a/STM32CubeMX/SCSI2SD-V6/Src/spi.c b/STM32CubeMX/SCSI2SD-V6/Src/spi.c
deleted file mode 100755 (executable)
index cfb19ce..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
-  ******************************************************************************
-  * File Name          : SPI.c
-  * Description        : This file provides code for the configuration
-  *                      of the SPI instances.
-  ******************************************************************************
-  *
-  * COPYRIGHT(c) 2019 STMicroelectronics
-  *
-  * Redistribution and use in source and binary forms, with or without modification,
-  * are permitted provided that the following conditions are met:
-  *   1. Redistributions of source code must retain the above copyright notice,
-  *      this list of conditions and the following disclaimer.
-  *   2. Redistributions in binary form must reproduce the above copyright notice,
-  *      this list of conditions and the following disclaimer in the documentation
-  *      and/or other materials provided with the distribution.
-  *   3. Neither the name of STMicroelectronics nor the names of its contributors
-  *      may be used to endorse or promote products derived from this software
-  *      without specific prior written permission.
-  *
-  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  *
-  ******************************************************************************
-  */
-
-/* Includes ------------------------------------------------------------------*/
-#include "spi.h"
-
-#include "gpio.h"
-
-/* USER CODE BEGIN 0 */
-
-/* USER CODE END 0 */
-
-SPI_HandleTypeDef hspi1;
-
-/* SPI1 init function */
-void MX_SPI1_Init(void)
-{
-
-  hspi1.Instance = SPI1;
-  hspi1.Init.Mode = SPI_MODE_MASTER;
-  hspi1.Init.Direction = SPI_DIRECTION_2LINES;
-  hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
-  hspi1.Init.CLKPolarity = SPI_POLARITY_HIGH;
-  hspi1.Init.CLKPhase = SPI_PHASE_2EDGE;
-  hspi1.Init.NSS = SPI_NSS_SOFT;
-  hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4;
-  hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
-  hspi1.Init.TIMode = SPI_TIMODE_DISABLED;
-  hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLED;
-  hspi1.Init.CRCPolynomial = 10;
-  HAL_SPI_Init(&hspi1);
-
-}
-
-void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
-{
-
-  GPIO_InitTypeDef GPIO_InitStruct;
-  if(hspi->Instance==SPI1)
-  {
-  /* USER CODE BEGIN SPI1_MspInit 0 */
-
-  /* USER CODE END SPI1_MspInit 0 */
-    /* Peripheral clock enable */
-    __SPI1_CLK_ENABLE();
-  
-    /**SPI1 GPIO Configuration    
-    PA5     ------> SPI1_SCK
-    PA6     ------> SPI1_MISO
-    PA7     ------> SPI1_MOSI 
-    */
-    GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
-    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
-    GPIO_InitStruct.Pull = GPIO_NOPULL;
-    GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
-    GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
-    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
-
-  /* USER CODE BEGIN SPI1_MspInit 1 */
-
-  /* USER CODE END SPI1_MspInit 1 */
-  }
-}
-
-void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
-{
-
-  if(hspi->Instance==SPI1)
-  {
-  /* USER CODE BEGIN SPI1_MspDeInit 0 */
-
-  /* USER CODE END SPI1_MspDeInit 0 */
-    /* Peripheral clock disable */
-    __SPI1_CLK_DISABLE();
-  
-    /**SPI1 GPIO Configuration    
-    PA5     ------> SPI1_SCK
-    PA6     ------> SPI1_MISO
-    PA7     ------> SPI1_MOSI 
-    */
-    HAL_GPIO_DeInit(GPIOA, GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7);
-
-  }
-  /* USER CODE BEGIN SPI1_MspDeInit 1 */
-
-  /* USER CODE END SPI1_MspDeInit 1 */
-} 
-
-/* USER CODE BEGIN 1 */
-
-/* USER CODE END 1 */
-
-/**
-  * @}
-  */
-
-/**
-  * @}
-  */
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
index d8a2ddfbdfe8998f50de1f7d784c01e0c282c12d..a22ddca6fcdb0b3fa6ea2c38940ae6ea21c4e786 100755 (executable)
@@ -40,7 +40,7 @@
 /* USER CODE END 0 */
 
 /* External variables --------------------------------------------------------*/
-extern PCD_HandleTypeDef hpcd_USB_OTG_FS;
+extern PCD_HandleTypeDef hpcd_USB_OTG_HS;
 extern DMA_HandleTypeDef hdma_sdio_tx;
 extern DMA_HandleTypeDef hdma_sdio_rx;
 extern SD_HandleTypeDef hsd;
@@ -113,20 +113,6 @@ void DMA2_Stream3_IRQHandler(void)
   /* USER CODE END DMA2_Stream3_IRQn 1 */
 }
 
-/**
-* @brief This function handles USB On The Go FS global interrupt.
-*/
-void OTG_FS_IRQHandler(void)
-{
-  /* USER CODE BEGIN OTG_FS_IRQn 0 */
-
-  /* USER CODE END OTG_FS_IRQn 0 */
-  HAL_PCD_IRQHandler(&hpcd_USB_OTG_FS);
-  /* USER CODE BEGIN OTG_FS_IRQn 1 */
-
-  /* USER CODE END OTG_FS_IRQn 1 */
-}
-
 /**
 * @brief This function handles DMA2 Stream6 global interrupt.
 */
@@ -141,6 +127,20 @@ void DMA2_Stream6_IRQHandler(void)
   /* USER CODE END DMA2_Stream6_IRQn 1 */
 }
 
+/**
+* @brief This function handles USB On The Go HS global interrupt.
+*/
+void OTG_HS_IRQHandler(void)
+{
+  /* USER CODE BEGIN OTG_HS_IRQn 0 */
+
+  /* USER CODE END OTG_HS_IRQn 0 */
+  HAL_PCD_IRQHandler(&hpcd_USB_OTG_HS);
+  /* USER CODE BEGIN OTG_HS_IRQn 1 */
+
+  /* USER CODE END OTG_HS_IRQn 1 */
+}
+
 /* USER CODE BEGIN 1 */
 
 /* USER CODE END 1 */
index 65547d478a42a450ea21b36669485d0b81d6055f..ac2b5362e8555480d1297c7d740721b10f438e7a 100755 (executable)
 
 /* USER CODE END 0 */
 
-UART_HandleTypeDef huart3;
+UART_HandleTypeDef huart4;
 
-/* USART3 init function */
-
-void MX_USART3_UART_Init(void)
+/* UART4 init function */
+void MX_UART4_Init(void)
 {
 
-  huart3.Instance = USART3;
-  huart3.Init.BaudRate = 115200;
-  huart3.Init.WordLength = UART_WORDLENGTH_8B;
-  huart3.Init.StopBits = UART_STOPBITS_1;
-  huart3.Init.Parity = UART_PARITY_NONE;
-  huart3.Init.Mode = UART_MODE_TX_RX;
-  huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE;
-  huart3.Init.OverSampling = UART_OVERSAMPLING_16;
-  HAL_UART_Init(&huart3);
+  huart4.Instance = UART4;
+  huart4.Init.BaudRate = 9600;
+  huart4.Init.WordLength = UART_WORDLENGTH_8B;
+  huart4.Init.StopBits = UART_STOPBITS_1;
+  huart4.Init.Parity = UART_PARITY_NONE;
+  huart4.Init.Mode = UART_MODE_TX_RX;
+  huart4.Init.HwFlowCtl = UART_HWCONTROL_NONE;
+  huart4.Init.OverSampling = UART_OVERSAMPLING_16;
+  HAL_UART_Init(&huart4);
 
 }
 
@@ -64,52 +63,52 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
 {
 
   GPIO_InitTypeDef GPIO_InitStruct;
-  if(huart->Instance==USART3)
+  if(huart->Instance==UART4)
   {
-  /* USER CODE BEGIN USART3_MspInit 0 */
+  /* USER CODE BEGIN UART4_MspInit 0 */
 
-  /* USER CODE END USART3_MspInit 0 */
+  /* USER CODE END UART4_MspInit 0 */
     /* Peripheral clock enable */
-    __USART3_CLK_ENABLE();
+    __UART4_CLK_ENABLE();
   
-    /**USART3 GPIO Configuration    
-    PB10     ------> USART3_TX
-    PB11     ------> USART3_RX 
+    /**UART4 GPIO Configuration    
+    PA0-WKUP     ------> UART4_TX
+    PA1     ------> UART4_RX 
     */
-    GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11;
+    GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1;
     GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
     GPIO_InitStruct.Pull = GPIO_PULLUP;
     GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
-    GPIO_InitStruct.Alternate = GPIO_AF7_USART3;
-    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+    GPIO_InitStruct.Alternate = GPIO_AF8_UART4;
+    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
 
-  /* USER CODE BEGIN USART3_MspInit 1 */
+  /* USER CODE BEGIN UART4_MspInit 1 */
 
-  /* USER CODE END USART3_MspInit 1 */
+  /* USER CODE END UART4_MspInit 1 */
   }
 }
 
 void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
 {
 
-  if(huart->Instance==USART3)
+  if(huart->Instance==UART4)
   {
-  /* USER CODE BEGIN USART3_MspDeInit 0 */
+  /* USER CODE BEGIN UART4_MspDeInit 0 */
 
-  /* USER CODE END USART3_MspDeInit 0 */
+  /* USER CODE END UART4_MspDeInit 0 */
     /* Peripheral clock disable */
-    __USART3_CLK_DISABLE();
+    __UART4_CLK_DISABLE();
   
-    /**USART3 GPIO Configuration    
-    PB10     ------> USART3_TX
-    PB11     ------> USART3_RX 
+    /**UART4 GPIO Configuration    
+    PA0-WKUP     ------> UART4_TX
+    PA1     ------> UART4_RX 
     */
-    HAL_GPIO_DeInit(GPIOB, GPIO_PIN_10|GPIO_PIN_11);
+    HAL_GPIO_DeInit(GPIOA, GPIO_PIN_0|GPIO_PIN_1);
 
   }
-  /* USER CODE BEGIN USART3_MspDeInit 1 */
+  /* USER CODE BEGIN UART4_MspDeInit 1 */
 
-  /* USER CODE END USART3_MspDeInit 1 */
+  /* USER CODE END UART4_MspDeInit 1 */
 } 
 
 /* USER CODE BEGIN 1 */
index f410ba7bdd8abda3cb8045b0e944fb88a46b647f..5a044dfeb31e2fee1e71967953c4196322557733 100755 (executable)
 #include "usb_device.h"
 #include "usbd_core.h"
 #include "usbd_desc.h"
-#include "usbd_hid.h"
+#include "usbd_msc.h"
+#include "usbd_storage_if.h"
 
 /* USB Device Core handle declaration */
-USBD_HandleTypeDef hUsbDeviceFS;
+USBD_HandleTypeDef hUsbDeviceHS;
 
 /* init function */                                    
 void MX_USB_DEVICE_Init(void)
 {
   /* Init Device Library,Add Supported Class and Start the library*/
-  USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS);
+  USBD_Init(&hUsbDeviceHS, &HS_Desc, DEVICE_HS);
 
-  USBD_RegisterClass(&hUsbDeviceFS, &USBD_HID);
+  USBD_RegisterClass(&hUsbDeviceHS, &USBD_MSC);
 
-  USBD_Start(&hUsbDeviceFS);
+  USBD_MSC_RegisterStorage(&hUsbDeviceHS, &USBD_Storage_Interface_fops_HS);
+
+  USBD_Start(&hUsbDeviceHS);
 
 }
 /**
index 272d38885dde98cfe05ccb958085f79a886d7d16..915a3fce257f401855e99531caff33817b1026a7 100755 (executable)
@@ -37,7 +37,7 @@
 #include "usbd_def.h"
 #include "usbd_core.h"
 
-PCD_HandleTypeDef hpcd_USB_OTG_FS;
+PCD_HandleTypeDef hpcd_USB_OTG_HS;
 
 /* External functions --------------------------------------------------------*/
 void SystemClock_Config(void);
@@ -65,31 +65,75 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd)
   /* USER CODE END USB_OTG_FS_MspInit 0 */
   
     /**USB_OTG_FS GPIO Configuration    
-    PA9     ------> USB_OTG_FS_VBUS
+    PA10     ------> USB_OTG_FS_ID
     PA11     ------> USB_OTG_FS_DM
     PA12     ------> USB_OTG_FS_DP 
     */
-    GPIO_InitStruct.Pin = GPIO_PIN_9;
-    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+    GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12;
+    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
     GPIO_InitStruct.Pull = GPIO_NOPULL;
+    GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
+    GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
     HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
 
-    GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
+    /* Peripheral clock enable */
+    __USB_OTG_FS_CLK_ENABLE();
+  /* USER CODE BEGIN USB_OTG_FS_MspInit 1 */
+
+  /* USER CODE END USB_OTG_FS_MspInit 1 */
+  }
+  else if(hpcd->Instance==USB_OTG_HS)
+  {
+  /* USER CODE BEGIN USB_OTG_HS_MspInit 0 */
+
+  /* USER CODE END USB_OTG_HS_MspInit 0 */
+  
+    /**USB_OTG_HS GPIO Configuration    
+    PC0     ------> USB_OTG_HS_ULPI_STP
+    PC2     ------> USB_OTG_HS_ULPI_DIR
+    PC3     ------> USB_OTG_HS_ULPI_NXT
+    PA3     ------> USB_OTG_HS_ULPI_D0
+    PA5     ------> USB_OTG_HS_ULPI_CK
+    PB0     ------> USB_OTG_HS_ULPI_D1
+    PB1     ------> USB_OTG_HS_ULPI_D2
+    PB10     ------> USB_OTG_HS_ULPI_D3
+    PB11     ------> USB_OTG_HS_ULPI_D4
+    PB12     ------> USB_OTG_HS_ULPI_D5
+    PB13     ------> USB_OTG_HS_ULPI_D6
+    PB5     ------> USB_OTG_HS_ULPI_D7 
+    */
+    GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_3;
     GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
     GPIO_InitStruct.Pull = GPIO_NOPULL;
     GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
-    GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
+    GPIO_InitStruct.Alternate = GPIO_AF10_OTG_HS;
+    HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
+
+    GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_5;
+    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+    GPIO_InitStruct.Pull = GPIO_NOPULL;
+    GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
+    GPIO_InitStruct.Alternate = GPIO_AF10_OTG_HS;
     HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
 
+    GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_10|GPIO_PIN_11 
+                          |GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_5;
+    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
+    GPIO_InitStruct.Pull = GPIO_NOPULL;
+    GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
+    GPIO_InitStruct.Alternate = GPIO_AF10_OTG_HS;
+    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
+
     /* Peripheral clock enable */
-    __USB_OTG_FS_CLK_ENABLE();
+    __USB_OTG_HS_CLK_ENABLE();
+    __USB_OTG_HS_ULPI_CLK_ENABLE();
 
     /* Peripheral interrupt init*/
-    HAL_NVIC_SetPriority(OTG_FS_IRQn, 0, 0);
-    HAL_NVIC_EnableIRQ(OTG_FS_IRQn);
-  /* USER CODE BEGIN USB_OTG_FS_MspInit 1 */
+    HAL_NVIC_SetPriority(OTG_HS_IRQn, 0, 0);
+    HAL_NVIC_EnableIRQ(OTG_HS_IRQn);
+  /* USER CODE BEGIN USB_OTG_HS_MspInit 1 */
 
-  /* USER CODE END USB_OTG_FS_MspInit 1 */
+  /* USER CODE END USB_OTG_HS_MspInit 1 */
   }
 }
 
@@ -104,19 +148,53 @@ void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd)
     __USB_OTG_FS_CLK_DISABLE();
   
     /**USB_OTG_FS GPIO Configuration    
-    PA9     ------> USB_OTG_FS_VBUS
+    PA10     ------> USB_OTG_FS_ID
     PA11     ------> USB_OTG_FS_DM
     PA12     ------> USB_OTG_FS_DP 
     */
-    HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_11|GPIO_PIN_12);
-
-    /* Peripheral interrupt Deinit*/
-    HAL_NVIC_DisableIRQ(OTG_FS_IRQn);
+    HAL_GPIO_DeInit(GPIOA, GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12);
 
   /* USER CODE BEGIN USB_OTG_FS_MspDeInit 1 */
 
   /* USER CODE END USB_OTG_FS_MspDeInit 1 */
   }
+  else if(hpcd->Instance==USB_OTG_HS)
+  {
+  /* USER CODE BEGIN USB_OTG_HS_MspDeInit 0 */
+
+  /* USER CODE END USB_OTG_HS_MspDeInit 0 */
+    /* Disable Peripheral clock */
+    __USB_OTG_HS_CLK_DISABLE();
+    __USB_OTG_HS_ULPI_CLK_DISABLE();
+  
+    /**USB_OTG_HS GPIO Configuration    
+    PC0     ------> USB_OTG_HS_ULPI_STP
+    PC2     ------> USB_OTG_HS_ULPI_DIR
+    PC3     ------> USB_OTG_HS_ULPI_NXT
+    PA3     ------> USB_OTG_HS_ULPI_D0
+    PA5     ------> USB_OTG_HS_ULPI_CK
+    PB0     ------> USB_OTG_HS_ULPI_D1
+    PB1     ------> USB_OTG_HS_ULPI_D2
+    PB10     ------> USB_OTG_HS_ULPI_D3
+    PB11     ------> USB_OTG_HS_ULPI_D4
+    PB12     ------> USB_OTG_HS_ULPI_D5
+    PB13     ------> USB_OTG_HS_ULPI_D6
+    PB5     ------> USB_OTG_HS_ULPI_D7 
+    */
+    HAL_GPIO_DeInit(GPIOC, GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_3);
+
+    HAL_GPIO_DeInit(GPIOA, GPIO_PIN_3|GPIO_PIN_5);
+
+    HAL_GPIO_DeInit(GPIOB, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_10|GPIO_PIN_11 
+                          |GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_5);
+
+    /* Peripheral interrupt Deinit*/
+    HAL_NVIC_DisableIRQ(OTG_HS_IRQn);
+
+  /* USER CODE BEGIN USB_OTG_HS_MspDeInit 1 */
+
+  /* USER CODE END USB_OTG_HS_MspDeInit 1 */
+  }
 }
 
 /**
@@ -277,26 +355,27 @@ void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
 USBD_StatusTypeDef  USBD_LL_Init (USBD_HandleTypeDef *pdev)
 { 
   /* Init USB_IP */
-  if (pdev->id == DEVICE_FS) {
-  /* Link The driver to the stack */   
-  hpcd_USB_OTG_FS.pData = pdev;
-  pdev->pData = &hpcd_USB_OTG_FS; 
-  
-  hpcd_USB_OTG_FS.Instance = USB_OTG_FS;
-  hpcd_USB_OTG_FS.Init.dev_endpoints = 7;
-  hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL;
-  hpcd_USB_OTG_FS.Init.dma_enable = DISABLE;
-  hpcd_USB_OTG_FS.Init.ep0_mps = DEP0CTL_MPS_64;
-  hpcd_USB_OTG_FS.Init.phy_itface = PCD_PHY_EMBEDDED;
-  hpcd_USB_OTG_FS.Init.Sof_enable = DISABLE;
-  hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE;
-  hpcd_USB_OTG_FS.Init.vbus_sensing_enable = ENABLE;
-  hpcd_USB_OTG_FS.Init.use_dedicated_ep1 = DISABLE;
-  HAL_PCD_Init(&hpcd_USB_OTG_FS);
-
-  HAL_PCD_SetRxFiFo(&hpcd_USB_OTG_FS, 0x80);
-  HAL_PCD_SetTxFiFo(&hpcd_USB_OTG_FS, 0, 0x40);
-  HAL_PCD_SetTxFiFo(&hpcd_USB_OTG_FS, 1, 0x80);
+  if (pdev->id == DEVICE_HS) {
+  /* Link The driver to the stack */
+  hpcd_USB_OTG_HS.pData = pdev;
+  pdev->pData = &hpcd_USB_OTG_HS;
+
+  hpcd_USB_OTG_HS.Instance = USB_OTG_HS;
+  hpcd_USB_OTG_HS.Init.dev_endpoints = 11;
+  hpcd_USB_OTG_HS.Init.speed = PCD_SPEED_HIGH;
+  hpcd_USB_OTG_HS.Init.dma_enable = ENABLE;
+  hpcd_USB_OTG_HS.Init.ep0_mps = DEP0CTL_MPS_64;
+  hpcd_USB_OTG_HS.Init.phy_itface = USB_OTG_ULPI_PHY;
+  hpcd_USB_OTG_HS.Init.Sof_enable = DISABLE;
+  hpcd_USB_OTG_HS.Init.low_power_enable = DISABLE;
+  hpcd_USB_OTG_HS.Init.vbus_sensing_enable = DISABLE;
+  hpcd_USB_OTG_HS.Init.use_dedicated_ep1 = DISABLE;
+  hpcd_USB_OTG_HS.Init.use_external_vbus = DISABLE;
+  HAL_PCD_Init(&hpcd_USB_OTG_HS);
+
+  HAL_PCD_SetRxFiFo(&hpcd_USB_OTG_HS, 0x200);
+  HAL_PCD_SetTxFiFo(&hpcd_USB_OTG_HS, 0, 0x80);
+  HAL_PCD_SetTxFiFo(&hpcd_USB_OTG_HS, 1, 0x174);
   }
   return USBD_OK;
 }
index 8957a55ecb79d7107bbe35599d18e5fdb49c0314..ec9af61d465868aa35b10d441ccfd58e8c0f3d36 100755 (executable)
 #define USBD_VID     1155
 #define USBD_LANGID_STRING     1033
 #define USBD_MANUFACTURER_STRING     "STMicroelectronics"
-#define USBD_PID_FS     22315
-#define USBD_PRODUCT_STRING_FS     "STM32 Human interface"
-/* USER CODE BEGIN SERIALNUMBER_STRING_FS */
-#define USBD_SERIALNUMBER_STRING_FS     "00000000001A"
-/* USER CODE END SERIALNUMBER_STRING_FS */
-#define USBD_CONFIGURATION_STRING_FS     "HID Config"
-#define USBD_INTERFACE_STRING_FS     "HID Interface"
+#define USBD_PID_HS     22314
+#define USBD_PRODUCT_STRING_HS     "STM32 Mass Storage"
+/* USER CODE BEGIN SERIALNUMBER_STRING_HS */
+#define USBD_SERIALNUMBER_STRING_HS     "00000000001A"
+/* USER CODE END SERIALNUMBER_STRING_HS */
+#define USBD_CONFIGURATION_STRING_HS     "MSC Config"
+#define USBD_INTERFACE_STRING_HS     "MSC Interface"
 
 /**
   * @}
 /** @defgroup USBD_DESC_Private_Variables
   * @{
   */ 
-uint8_t *     USBD_FS_DeviceDescriptor( USBD_SpeedTypeDef speed , uint16_t *length);
-uint8_t *     USBD_FS_LangIDStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length);
-uint8_t *     USBD_FS_ManufacturerStrDescriptor ( USBD_SpeedTypeDef speed , uint16_t *length);
-uint8_t *     USBD_FS_ProductStrDescriptor ( USBD_SpeedTypeDef speed , uint16_t *length);
-uint8_t *     USBD_FS_SerialStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length);
-uint8_t *     USBD_FS_ConfigStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length);
-uint8_t *     USBD_FS_InterfaceStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length);
+
+uint8_t *     USBD_HS_DeviceDescriptor( USBD_SpeedTypeDef speed , uint16_t *length);
+uint8_t *     USBD_HS_LangIDStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length);
+uint8_t *     USBD_HS_ManufacturerStrDescriptor ( USBD_SpeedTypeDef speed , uint16_t *length);
+uint8_t *     USBD_HS_ProductStrDescriptor ( USBD_SpeedTypeDef speed , uint16_t *length);
+uint8_t *     USBD_HS_SerialStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length);
+uint8_t *     USBD_HS_ConfigStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length);
+uint8_t *     USBD_HS_InterfaceStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length);
 
 #ifdef USB_SUPPORT_USER_STRING_DESC
-uint8_t *     USBD_FS_USRStringDesc (USBD_SpeedTypeDef speed, uint8_t idx , uint16_t *length);  
+uint8_t *     USBD_HS_USRStringDesc (USBD_SpeedTypeDef speed, uint8_t idx , uint16_t *length);  
 #endif /* USB_SUPPORT_USER_STRING_DESC */  
 
-USBD_DescriptorsTypeDef FS_Desc =
+USBD_DescriptorsTypeDef HS_Desc =
 {
-  USBD_FS_DeviceDescriptor,
-  USBD_FS_LangIDStrDescriptor, 
-  USBD_FS_ManufacturerStrDescriptor,
-  USBD_FS_ProductStrDescriptor,
-  USBD_FS_SerialStrDescriptor,
-  USBD_FS_ConfigStrDescriptor,
-  USBD_FS_InterfaceStrDescriptor,
+  USBD_HS_DeviceDescriptor,
+  USBD_HS_LangIDStrDescriptor, 
+  USBD_HS_ManufacturerStrDescriptor,
+  USBD_HS_ProductStrDescriptor,
+  USBD_HS_SerialStrDescriptor,
+  USBD_HS_ConfigStrDescriptor,
+  USBD_HS_InterfaceStrDescriptor,
 };
 
 #if defined ( __ICCARM__ ) /*!< IAR Compiler */
   #pragma data_alignment=4   
 #endif
 /* USB Standard Device Descriptor */
-__ALIGN_BEGIN uint8_t USBD_FS_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
+__ALIGN_BEGIN uint8_t USBD_HS_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
   {
     0x12,                       /*bLength */
     USB_DESC_TYPE_DEVICE,       /*bDescriptorType*/
-    0x00,                       /* bcdUSB */  
+    0x00,                       /* bcdUSB */
+
     0x02,
     0x00,                       /*bDeviceClass*/
     0x00,                       /*bDeviceSubClass*/
@@ -120,8 +122,8 @@ __ALIGN_BEGIN uint8_t USBD_FS_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
     USB_MAX_EP0_SIZE,          /*bMaxPacketSize*/
     LOBYTE(USBD_VID),           /*idVendor*/
     HIBYTE(USBD_VID),           /*idVendor*/
-    LOBYTE(USBD_PID_FS),           /*idVendor*/
-    HIBYTE(USBD_PID_FS),           /*idVendor*/
+    LOBYTE(USBD_PID_HS),           /*idVendor*/
+    HIBYTE(USBD_PID_HS),           /*idVendor*/
     0x00,                       /*bcdDevice rel. 2.00*/
     0x02,
     USBD_IDX_MFC_STR,           /*Index of manufacturer  string*/
@@ -162,102 +164,101 @@ __ALIGN_BEGIN uint8_t USBD_StrDesc[USBD_MAX_STR_DESC_SIZ] __ALIGN_END;
 /** @defgroup USBD_DESC_Private_Functions
   * @{
   */ 
-
 /**
-* @brief  USBD_FS_DeviceDescriptor 
+* @brief  USBD_HS_DeviceDescriptor 
 *         return the device descriptor
 * @param  speed : current device speed
 * @param  length : pointer to data length variable
 * @retval pointer to descriptor buffer
 */
-uint8_t *  USBD_FS_DeviceDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
+uint8_t *  USBD_HS_DeviceDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
 {
-  *length = sizeof(USBD_FS_DeviceDesc);
-  return USBD_FS_DeviceDesc;
+  *length = sizeof(USBD_HS_DeviceDesc);
+  return USBD_HS_DeviceDesc;
 }
 
 /**
-* @brief  USBD_FS_LangIDStrDescriptor 
+* @brief  USBD_HS_LangIDStrDescriptor 
 *         return the LangID string descriptor
 * @param  speed : current device speed
 * @param  length : pointer to data length variable
 * @retval pointer to descriptor buffer
 */
-uint8_t *  USBD_FS_LangIDStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
+uint8_t *  USBD_HS_LangIDStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
 {
   *length =  sizeof(USBD_LangIDDesc);  
   return USBD_LangIDDesc;
 }
 
 /**
-* @brief  USBD_FS_ProductStrDescriptor 
+* @brief  USBD_HS_ProductStrDescriptor 
 *         return the product string descriptor
 * @param  speed : current device speed
 * @param  length : pointer to data length variable
 * @retval pointer to descriptor buffer
 */
-uint8_t *  USBD_FS_ProductStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
+uint8_t *  USBD_HS_ProductStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
 {
   if(speed == 0)
   {   
-    USBD_GetString (USBD_PRODUCT_STRING_FS, USBD_StrDesc, length);
+    USBD_GetString ((uint8_t *)USBD_PRODUCT_STRING_HS, USBD_StrDesc, length);
   }
   else
   {
-    USBD_GetString (USBD_PRODUCT_STRING_FS, USBD_StrDesc, length);    
+    USBD_GetString ((uint8_t *)USBD_PRODUCT_STRING_HS, USBD_StrDesc, length);    
   }
   return USBD_StrDesc;
 }
 
 /**
-* @brief  USBD_FS_ManufacturerStrDescriptor 
+* @brief  USBD_HS_ManufacturerStrDescriptor 
 *         return the manufacturer string descriptor
 * @param  speed : current device speed
 * @param  length : pointer to data length variable
 * @retval pointer to descriptor buffer
 */
-uint8_t *  USBD_FS_ManufacturerStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
+uint8_t *  USBD_HS_ManufacturerStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
 {
-  USBD_GetString (USBD_MANUFACTURER_STRING, USBD_StrDesc, length);
+  USBD_GetString ((uint8_t *)USBD_MANUFACTURER_STRING, USBD_StrDesc, length);
   return USBD_StrDesc;
 }
 
 /**
-* @brief  USBD_FS_SerialStrDescriptor 
+* @brief  USBD_HS_SerialStrDescriptor 
 *         return the serial number string descriptor
 * @param  speed : current device speed
 * @param  length : pointer to data length variable
 * @retval pointer to descriptor buffer
 */
-uint8_t *  USBD_FS_SerialStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
+uint8_t *  USBD_HS_SerialStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
 {
   if(speed  == USBD_SPEED_HIGH)
   {    
-    USBD_GetString (USBD_SERIALNUMBER_STRING_FS, USBD_StrDesc, length);
+    USBD_GetString ((uint8_t *)USBD_SERIALNUMBER_STRING_HS, USBD_StrDesc, length);
   }
   else
   {
-    USBD_GetString (USBD_SERIALNUMBER_STRING_FS, USBD_StrDesc, length);    
+    USBD_GetString ((uint8_t *)USBD_SERIALNUMBER_STRING_HS, USBD_StrDesc, length);    
   }
   return USBD_StrDesc;
 }
 
 /**
-* @brief  USBD_FS_ConfigStrDescriptor 
+* @brief  USBD_HS_ConfigStrDescriptor 
 *         return the configuration string descriptor
 * @param  speed : current device speed
 * @param  length : pointer to data length variable
 * @retval pointer to descriptor buffer
 */
-uint8_t *  USBD_FS_ConfigStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
+uint8_t *  USBD_HS_ConfigStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
 {
   if(speed  == USBD_SPEED_HIGH)
   {  
-    USBD_GetString (USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length);
+    USBD_GetString ((uint8_t *)USBD_CONFIGURATION_STRING_HS, USBD_StrDesc, length);
   }
   else
   {
-    USBD_GetString (USBD_CONFIGURATION_STRING_FS, USBD_StrDesc, length); 
+    USBD_GetString ((uint8_t *)USBD_CONFIGURATION_STRING_HS, USBD_StrDesc, length); 
   }
   return USBD_StrDesc;  
 }
@@ -269,18 +270,34 @@ uint8_t *  USBD_FS_ConfigStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *leng
 * @param  length : pointer to data length variable
 * @retval pointer to descriptor buffer
 */
-uint8_t *  USBD_FS_InterfaceStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
+uint8_t *  USBD_HS_InterfaceStrDescriptor( USBD_SpeedTypeDef speed , uint16_t *length)
 {
   if(speed == 0)
   {
-    USBD_GetString (USBD_INTERFACE_STRING_FS, USBD_StrDesc, length);
+    USBD_GetString ((uint8_t *)USBD_INTERFACE_STRING_HS, USBD_StrDesc, length);
   }
   else
   {
-    USBD_GetString (USBD_INTERFACE_STRING_FS, USBD_StrDesc, length);
+    USBD_GetString ((uint8_t *)USBD_INTERFACE_STRING_HS, USBD_StrDesc, length);
   }
   return USBD_StrDesc;  
 }
+
+#if (USBD_LPM_ENABLED == 1)
+/**
+  * @brief  USBD_HS_USR_BOSDescriptor 
+  *         return the BOS descriptor
+  * @param  speed : current device speed
+  * @param  length : pointer to data length variable
+  * @retval pointer to descriptor buffer
+  */
+uint8_t *USBD_HS_USR_BOSDescriptor(USBD_SpeedTypeDef speed , uint16_t *length)
+{
+  *length = sizeof(USBD_HS_BOSDesc);
+  return (uint8_t*)USBD_HS_BOSDesc;
+}
+#endif
+
 /**
   * @}
   */