2024-05-12 11:05 PM
Sorry, Google Translate changed my previous post to Polish. That's probably why no one answered me.
Now the post is correct.
I'm creating a custom board using a used STM32H563VIT. Nice processor, but I can't understand how to create an Audo class, even if it's BT 1.0.
In the F series of processors, e.g. STM32F720, it was simple, but here it is somehow mixed up.
USB parts diagram:
I am trying to use a USB Adio class device.
For this reason, there is no AZURE RTOS in the IDE (H5).
I have configured the USB
I configured USBX as FS_Device
I took the stack size
After my changes
The device is in working order HAL_PCD_STATE_READY
UINT MX_USBX_Device_Init(VOID)
{
UINT ret = UX_SUCCESS;
...
UX_PARAMETER_NOT_USED(ux_device_byte_pool_buffer);
...
return ret;
}
However, the system does not detect the device.
What else should I do for the system to detect the device?
2024-05-13 12:45 AM - edited 2024-05-13 12:46 AM
Hi,
i made Audio host , with Azure/threadx, so its not same, but :
- i needed a lot more memory, to get it work -> so try more memory
+
Try enabled ... if not sure, that disabled is, what you want.
2024-05-13 04:09 AM
Ok. ThreadX They started.
Teraz krąży w tx_thread_schedule.
Zastanawiam się czy nie powinienem mieć
Jak tutaj:
To jest przykład dla CDC
Did you have additional code to initialize the USB stack?
2024-05-13 05:15 AM
No...it should connect.
just try something to send.
2024-05-13 05:17 AM
My computer does not detect the device, so it cannot be shipped.
2024-05-13 06:04 AM
Try another usb cable (except, you are 100% sure, this is working ).
+
Check, is USB power enabled ?
in MX_USB_HCD_Init() .
+
Try debug -> SFR : usb registers, state of DP+ (needs to switch on the pullup, to start enumeration from host/PC ).
2024-05-13 06:33 AM
I don't have the HCD function, I have PCD
static void MX_USB_PCD_Init(void)
{
/* USER CODE BEGIN USB_Init 0 */
/* USER CODE END USB_Init 0 */
/* USER CODE BEGIN USB_Init 1 */
/* USER CODE END USB_Init 1 */
hpcd_USB_DRD_FS.Instance = USB_DRD_FS;
hpcd_USB_DRD_FS.Init.dev_endpoints = 8;
hpcd_USB_DRD_FS.Init.speed = USBD_FS_SPEED;
hpcd_USB_DRD_FS.Init.phy_itface = PCD_PHY_EMBEDDED;
hpcd_USB_DRD_FS.Init.Sof_enable = DISABLE;
hpcd_USB_DRD_FS.Init.low_power_enable = DISABLE;
hpcd_USB_DRD_FS.Init.lpm_enable = DISABLE;
hpcd_USB_DRD_FS.Init.battery_charging_enable = DISABLE;
hpcd_USB_DRD_FS.Init.vbus_sensing_enable = DISABLE;
hpcd_USB_DRD_FS.Init.bulk_doublebuffer_enable = DISABLE;
hpcd_USB_DRD_FS.Init.iso_singlebuffer_enable = DISABLE;
if (HAL_PCD_Init(&hpcd_USB_DRD_FS) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USB_Init 2 */
/* USER CODE END USB_Init 2 */
}
state of DP+ (needs to switch on the pullup, to start enumeration from host/PC ).
This isn't what the stack currently does?
I know in the previous ones this was handled by the stack.
Did you enter additional code for this?
/* USER CODE END USB_Init 2 */
}
2024-05-13 08:55 AM
>Did you enter additional code for this?
As i wrote, i only made host with Azure, so i cannot tell you much about device.
+
Try debug -> SFR : usb registers, state of DP+
to see, is power enabled etc.
2024-05-13 10:41 AM - edited 2024-05-13 11:22 AM
I checked with an oscilloscope, no signal on DP.
I only see power disturbances
After soldering the 1K5 resistor to +3.3V, the system recognizes the device, but does not recognize it.
Now I have
The descriptor request failed
2024-05-13 11:27 AM
>I checked with an oscilloscope, no signal on DP.
So its not powered or started .
In my usb-host setup, no power was enabled, so i had to add (in xxx_hal_msp.c )
/* USER CODE BEGIN USB_DRD_FS_MspInit 1 */
HAL_PWREx_EnableVddUSB();
/* USER CODE END USB_DRD_FS_MspInit 1 */
Look, if your "version" has it - or just try, add it.
+
No need for the 1k5 , the chip doing this - if enabled.