Code Monkey home page Code Monkey logo

Comments (22)

ALABSTM avatar ALABSTM commented on August 16, 2024

Hi @geek-slt,

Thank you for this report. It will be forwarded to our development teams for analysis. We will get back to you as soon as we have an answer.

With regards,

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024

@ALABSTM very much looking forward to your help

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024

I have some new developments and need to sync with you
1.The previous USB did not reflect anything because the USB in the example was initialized as an HS device, but on my hardware it was an FS device. When I changed the USB initialization part to an FS device, the device manager prompts that a new device is inserted, but Failed to get device descriptor
2.I tried a series of operations such as changing the descriptor, but the problem still exists, win10 always prompts that the device descriptor request failed
3.How can I continue troubleshooting?

from x-cube-azrtos-h7.

Mathullah avatar Mathullah commented on August 16, 2024

@arilink I have similar issues in the past with another USB library on an STM32F7 device. Try the following:

  • Disable Data Cache on the MCU (if enabled)
  • Disable USB DMA transfer (if enabled)
  • Configure the MMU

Hope this helps. I was ending with disabling the Data cache. Best solution would be to setup the MMU in a way that the DMA accessible sections are not cached.

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024
  1. I try to close I DCache and it doesn't work
  2. I did not enable USB DMA
  3. No MMU

Can I send the project to you to check?

from x-cube-azrtos-h7.

ALABSTM avatar ALABSTM commented on August 16, 2024

Hi @arilink,

Yes please do. This would be helpful.

With regards,

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024

@ALABSTM Can you leave your mailbox? I send the project to you

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024

@ALABSTM My email is [email protected] You can send me an email and I will send my project to you for review

from x-cube-azrtos-h7.

ALABSTM avatar ALABSTM commented on August 16, 2024

Hi,

@arilink, you can send your project attached to you comment on GitHub. Remove any generated or unnecessary file to optimize the size, zip it then attached to your comment as said. Here is how to proceed.

@Mathullah, thank you very much for your contribution and support.

With regards,

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024

Threadx - HID+CDC.zip

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024

@ALABSTM I have a problem with my computer and I didn’t reply in time. I have uploaded the complete MDK project. Please check it out.

from x-cube-azrtos-h7.

ALABSTM avatar ALABSTM commented on August 16, 2024

Hi @arilink,

Your project files have been well received. We are investigating the behavior you described. I will get back to you as soon as I have feedback.

With regards,

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024

@ALABSTM how's the progress?

from x-cube-azrtos-h7.

ALABSTM avatar ALABSTM commented on August 16, 2024

Hi @arilink,

Still working on it.

With regards,

from x-cube-azrtos-h7.

ALABSTM avatar ALABSTM commented on August 16, 2024

Hi @arilink,

We noticed the structure and the generated code of your project are different from the default ones generated by Cube MX (e.g., implementation of the SystemClock_Config(), bsp.c file added, MX_GPIO_Init() and MX_DMA_Init() functions moved to bsp.c). Would you mind regenerating your project using latest version of Cube MX and send us the IOC file please? Thank you in advance.

Besides, we noticed the following:

  • In the file ./bsp/bsp.c, memory region should be left MPU_ACCESS_NOT_BUFFERABLE and MPU_ACCESS_NOT_CACHEABLE as recommended by our development teams (lines 290 and 291).
  • The provided application constituting your starting point uses the high speed (HS) while your project uses the full speed (FS) one.
    • In the file ./bsp/src/usb_otg.c, value GPIO_AF10_OTG1_FS shall be replaced by GPIO_AF10_OTG2_FS at line 103 (this should be automatically fixed once the project regenerated with Cube MX).
    • In the file ./usbx_app/app_usbx_device.c, line 360 needs to be updated as below:
  /* initialize the device controller driver*/
-  ux_dcd_stm32_initialize((ULONG)USB_OTG_HS, (ULONG)&hpcd_USB_OTG_FS);
+  ux_dcd_stm32_initialize((ULONG)USB_OTG_FS, (ULONG)&hpcd_USB_OTG_FS);
  • The provided application constituting your starting point does not support the ARM Compiler v6.
    • However, your project configuration indicates this version is the one used.
    • Please pay attention that folder ac6 is not related to ARM Compiler v6 (as the resemblance with folder name ac5 may suggest) but rather to AC6-Tools.
  • To be able to use the ARM Compiler v6, the update below needs to be made to the following files:
    • ./bsp/src/usb_otg.c
    • ./usbx_app/app_usbx.c
    • ./usbx_app/ux_device_cdc_acm.c
-#elif defined ( __CC_ARM ) /* MDK ARM Compiler */
+#elif defined ( __CC_ARM ) || defined ((__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) /* MDK ARM Compiler */
  • Once the above update made, please do not forget to align the section names in your scatter file (e.g., .UsbxAppSection).

We hope this helps. We will wait your IOC file to further investigate.

With regards,

from x-cube-azrtos-h7.

ALABSTM avatar ALABSTM commented on August 16, 2024

Hi @arilink,

Would it be possible to have the trace of the USB enumeration phase once your device is plugged? This would also be of great help.

Thanks,

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024

@ALABSTM I will try it later, thank you very much for your help

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024

Hello, I used the cubemx configuration and added ThreadX and USBX related components in the Software Packs, and added the USBX sample program imitating the H7 example, but the USB still does not work. Can you help me check the problem? I have been troubled by USBX for a long time.

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024

@ALABSTM Thank you very much for your support, the problem has been solved

from x-cube-azrtos-h7.

Mathullah avatar Mathullah commented on August 16, 2024

@arilink Can you short explain how you solved this? The community would appreciate it very much, especially myself since we're planing to start a new project with a similar configuration. Thanks!

from x-cube-azrtos-h7.

arilink-tech avatar arilink-tech commented on August 16, 2024
  1. Check and confirm whether the USB used in the project is FS or HS and adjust the USB initialization part of the code in app_usbx_device.c->MX_USB_Device_Init
  2. Check and confirm that the USB interrupt is turned on
  3. Check and confirm that the USB clock is correctly configured
  4. Check and confirm that the size of the memory pool allocated to the USB task in the tx_application_define() function is appropriate
  5. If none of the above is a problem, check the USB App program

from x-cube-azrtos-h7.

Mathullah avatar Mathullah commented on August 16, 2024

@arilink thank you!

from x-cube-azrtos-h7.

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.