GithubHelp home page GithubHelp logo

Comments (9)

ALABSTM avatar ALABSTM commented on August 22, 2024

Related to issue STM32CubeF4#10.

from stm32cubef4.

ALABSTM avatar ALABSTM commented on August 22, 2024

Hi @jrahlf,

Thank you for this other optimization proposal. It will be logged into our internal database too. Identified descriptors that could be placed in read-only region are listed below.

With regards,

__ALIGN_BEGIN static uint8_t USBD_CDC_DeviceQualifierDesc[USB_LEN_DEV_QUALIFIER_DESC] __ALIGN_END =

__ALIGN_BEGIN static uint8_t USBD_CDC_CfgHSDesc[USB_CDC_CONFIG_DESC_SIZ] __ALIGN_END =

__ALIGN_BEGIN static uint8_t USBD_CDC_CfgFSDesc[USB_CDC_CONFIG_DESC_SIZ] __ALIGN_END =

__ALIGN_BEGIN static uint8_t USBD_CDC_OtherSpeedCfgDesc[USB_CDC_CONFIG_DESC_SIZ] __ALIGN_END =

from stm32cubef4.

ALABSTM avatar ALABSTM commented on August 22, 2024

ST Internal Reference: 99842

from stm32cubef4.

ALABSTM avatar ALABSTM commented on August 22, 2024

Hi @jrahlf,

Regarding this question below, may I ask you to clarify which "documentation" you are referring to?

  1. The documentation for the different fields in the descriptors is different for "high speed" / "full speed" / "other speed". Please consolidate that.

Thank you,

from stm32cubef4.

jrahlf avatar jrahlf commented on August 22, 2024

Hi @ALABSTM , please see the attached image regarding the differences in the documentation. I think only the "OtherSpeed" descriptor is affected. E.g. one documentation says 100mA and the other one says 0mA even though the value is the same. There also other subtle differences, .e.g differences in whitespace or
/* bInterval: ignore for Bulk transfer */ vs
/* bInterval */.

As I now understand, the OtherSpeed desciptor is to inform the host about the possible Highspeed configuration, if the device is running in FullSpeed mode. If that is the case, the wMaxPacketSize field should be set to 512 instead of 64 (for the OtherSpeed descriptor). Can you check this?

image

from stm32cubef4.

ALABSTM avatar ALABSTM commented on August 22, 2024

ST Internal Reference: 99959

from stm32cubef4.

ALABSTM avatar ALABSTM commented on August 22, 2024

Hi @jrahlf,

Thank you for the clarification. The point has been logged into our internal database. Regarding your other question below, I let @CHAMSTM comment.

  1. Why is there even a descriptor for "other speed" ? It sets the bDescriptorType field to 7, I cannot find any documentation for this value on the internet. Why is it not 0x2?

With regards,

from stm32cubef4.

ALABSTM avatar ALABSTM commented on August 22, 2024

Hi @jrahlf,

I hope you are doing well. According to our development teams, a couple of use-cases have been identified where the user could modify some fields of the device configuration descriptor at run-time preventing from moving its location into read-only memory.

With regards,

from stm32cubef4.

ALABSTM avatar ALABSTM commented on August 22, 2024

Hi @jrahlf,

I hope you are doing well.

  • Regarding moving the device configuration descriptor to a "read-only" memory region, this is not possible according to our development teams. Indeed, the descriptor is stored in pdev->pConfDesc and, depending on the use-case, some fields could be changed at run time. With a simple software disconnect-then-connect operation, the new descriptor will be shared to the host.
  • Regarding the documentation found in the comments, it has been updated in the frame of v2.8.0 of the USB Device Library found in the stm32_mw_usb_device repository.

Thank you again for having shared this proposal. Please allow me to close this issue now. Thank you for your comprehension.

Regards,
Aymen

from stm32cubef4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.