USBHS_USBSTS SEI System Error cause?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USBHS_USBSTS SEI System Error cause?

ソリューションへジャンプ
1,542件の閲覧回数
spiderman
Contributor III

I am implementing the USB stack (High Speed, EHCI controller) on a Kinetis MK26FN2M0VMI18 starting from the code generated by the latest MCUXpresso SDK.

I am trying to implement an USB Virtual COM device.

When using the project generated by the SDK the device is enumerated correctly. 

However, I need to import the USB code, including initialization of clock and registers, in our existing project, so I tried to do this process with the greatest care. Nevertheless, the enumeration is not working: the PC is giving the message "Unrecognized USB device". The _usb_dci_usbhs_isr service routine is never called with EHCI_STS_INT set (the UI bit of USBHS_USBSTS register), which would imply serving the GET_DESCRIPTOR request from the PC. The interrupt is enabled: bit UE of USBHS_USBINTR is set correctly.

In the USBHS_USBSTS register, the SEI bit is set (this does not happen in the original MCUXpresso project). Documentation says "System Error - Set when an error is detected on the system bus".

What could I have missed in importing the USB code in our project? What are the possible causes of the SEI error?

Thank you.

 

 

 

0 件の賞賛
返信
1 解決策
1,485件の閲覧回数
spiderman
Contributor III

The above problem turned out to be caused by the missing disabling of the MPU:

MPU_CESR_REG(MPU_BASE_PTR) &= ~MPU_CESR_VLD_MASK;

Now the device is enumerating correctly, at least at the first insertion. Possibly some problems sometimes when detaching and attaching again, to be verified.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,486件の閲覧回数
spiderman
Contributor III

The above problem turned out to be caused by the missing disabling of the MPU:

MPU_CESR_REG(MPU_BASE_PTR) &= ~MPU_CESR_VLD_MASK;

Now the device is enumerating correctly, at least at the first insertion. Possibly some problems sometimes when detaching and attaching again, to be verified.

0 件の賞賛
返信
1,497件の閲覧回数
spiderman
Contributor III

The only difference in registers which might be related to USB, between working sample project and not working project is:

                                               WORKING SAMPLE PROJECT                      NOT WORKING PROJECT

USBHS_USBSTS                  UI=1, SLI=1                                                      UI=0 (never at 1), SLI=0, SEI=1

USBHS_PORTSC1                LS=00, SUSP=0                                               LS=10, SUSP=1

What can cause SEI=1 and SUSP=1?

Is the difference between values of LS field important? What is its meaning?

Please advise. Many thanks.

0 件の賞賛
返信