2018-11-11 04:47 PM
I am using STM32Cube_FW_F4_V1.21.0.This is very excellent software.UART,SPI,I2S,RTC,,,work fine but HS-IN-FS.
I have checked HS and FS works fine.
My target board is STM32469I-EVAL board and I'm using EWARM compiler suite.
My application is USB_Device/MSC_Standalone.
(I used HS-IN-FS workspace file so USE_USB_HS and USE_USB_HS_IN_FS are defined properly)
I run without any change,I can built program without an error.I downloaded and executed.
and program reached while(1).I connected USB cable to (CN14) but windows explore was not able to find mass strage device.
USB related registers were set below.
GOTGCTL= 3010000
GOTGINT=100000
GAHBCFG= 1
GUSBCFG=40001440
GRSTCTL=80000000
GINTSTS= 4008020
GINTMSK=c03c3814
GRXSTSR= 0
GRXSTSP= 0
GRXFSIZ= 200
DIEPTXF0_HNPTXFSIZ= 800200
HNPTXSTS= 80080
GCCFG=210000
CID=2100
GHWCFG3= 3eed2e8
GLPMCFG= 0
GDFIFOCFG= 3ee0400
HPTXFSIZ= 0
---- 0x4004 0800 ----------------------------
DCFG = 8200003
DCTL = 0
DSTS = 6
DIEPMSK = 0
DOEPMSK = 0
DAINT = 0
DAINTMSK = 0
DVBUSDIS = 17d7
DVBUSPULSE = 5b8
DTHRCTL = c100020
DIEPEMPMSK = 0
DEACHINT = 0
DEACHINTMSK = 0
HS_DIEPEACHMSK1 = 0
HS_DOEPEACHMSK1 = 0
---- 0x4004 0800 ----------------------------
DIEPCTL0 = 8000
DIEPTSIZ0 = 0
DOEPCTL0 = 8000
DOEPTSIZ0 = 0
Looks like DCFG register is incorrect.DSPD[1:0] = 11 means Full speed to work with internal FS PHY.
So I modified usbd_conf.c and stm32xx_ll_usb.c to select Full speed using HS.
After modification,I tetsted.Program.But It still has problem.
register were set below.
GOTGCTL= 3010000
GOTGINT=100000
GAHBCFG= 1
GUSBCFG=40001440
GRSTCTL=80000000
GINTSTS= 4008020
GINTMSK=c03c3814
GRXSTSR= 0
GRXSTSP= 0
GRXFSIZ= 200
DIEPTXF0_HNPTXFSIZ= 800200
HNPTXSTS= 80080
GCCFG=210000
CID=2100
GHWCFG3= 3eed2e8
GLPMCFG= 0
GDFIFOCFG= 3ee0400
HPTXFSIZ= 0
---- 0x4004 0800 ----------------------------
DCFG = 8200001
DCTL = 0
DSTS = 7ff02
DIEPMSK = 0
DOEPMSK = 0
DAINT = 0
DAINTMSK =
0 DVBUSDIS = 17d7
DVBUSPULSE = 5b8
DTHRCTL = c100020
DIEPEMPMSK = 0
DEACHINT = 0
DEACHINTMSK = 0
HS_DIEPEACHMSK1 = 0
HS_DOEPEACHMSK1 = 0
---- 0x4004 0800 ----------------------------
DIEPCTL0 = 8000
DIEPTSIZ0 = 0
DOEPCTL0 = 8000
DOEPTSIZ0 = 0
PCGCCTL = 0
ENUMSPD bit in DSTS register was 01,means reserved.So I was not able to connect to Windows explore.
Could you teach me how to set up these registers ?
If you have workaround software,please provide me.
If you need more info,let me know.
Best Regards,
Thank you.
Takao Kawai