cherry-embedded / CherryUSB

CherryUSB is a tiny, beautiful and portable USB host and device stack for embedded system with USB IP
https://cherryusb.readthedocs.io/
Apache License 2.0
1.21k stars 256 forks source link

开启 CONFIG_USBDEV_ADVANCE_DESC 后无法枚举 #112

Closed RikkaW closed 1 year ago

RikkaW commented 1 year ago

CherryUSB 版本:v0.9.0 (9d24ae4) MCU:CH32V307

虽然不知道为什么但是把 usbd_get_descriptor 里面所有这种的都改成 memcpy(*data, xxx_descriptor, *len) 这样的就又正常工作了(

https://github.com/sakumisu/CherryUSB/blob/85a494326a45550e27fadd6aced0691e38aa4aba/core/usbd_core.c#L173-L176

sakumisu commented 1 year ago

描述符都是放在flash,ch32 dma无法访问flash,所以需要memcpy,所以不要使用高级功能,没有做memcpy处理

tpunix commented 8 months ago

描述符不声明为const,就会放在sram里面了。