Page 1 of 1

请代码维护者改正 USB 代码错误,从4.2到4.4都没改过来 [IDFGH-5223]

Posted: Thu May 06, 2021 8:15 am
by abcrazy2020
以下说的是 4.4 master 的版本,4.2版本路径略有不同。
1.文件:
esp-idf/components/soc/esp32s2/include/soc/usb_struct.h


volatile uint32_t grxstsp; /*!< 0x20 */
volatile uint32_t grxfsiz;
volatile uint32_t gnptxfsiz;
volatile uint32_t gnptxsts;
volatile uint32_t reserved0x2c;
volatile uint32_t gpvndctl; /*!< 0x30 */

reserved0x2c; 这句其实就已经是 0x30 了

volatile uint32_t ghwcfg1; /*!< 0x40 */
volatile uint32_t ghwcfg2;
volatile uint32_t ghwcfg3;
volatile uint32_t ghwcfg4; /*!< 0x50 */

ghwcfg4; 这句虽然确实是 0x5C,但前面注释的偏移位置全部错误了

2.文件:
esp-idf/components/hal/esp32s2/include/hal/usb_ll.h
函数:
static inline void usb_ll_int_phy_pullup_conf(bool dp_pu, bool dp_pd, bool dm_pu, bool dm_pd)
{
usb_wrap_otg_conf_reg_t conf = USB_WRAP.otg_conf;
conf.pad_pull_override = 1;
conf.dp_pullup = dp_pu;
conf.dp_pulldown = dp_pd;
conf.dm_pullup = dm_pu;
conf.dm_pulldown = dp_pd;
USB_WRAP.otg_conf = conf;
}
错误:
conf.dp_pulldown = dp_pd;
conf.dm_pulldown = dp_pd;
这两个明显有一个是错的,都指向同一个参数

Re: 请代码维护者改正 USB 代码错误,从4.2到4.4都没改过来

Posted: Thu May 06, 2021 9:06 am
by ESP_Gargamel
感谢反馈,将尽快确认。

Re: 请代码维护者改正 USB 代码错误,从4.2到4.4都没改过来

Posted: Fri May 07, 2021 7:59 am
by ESP_michael
abcrazy2020 :

感谢你的反馈~两处看起来应该都是有问题的,不过都不影响使用,我们会尽快更正。

Michael

Re: 请代码维护者改正 USB 代码错误,从4.2到4.4都没改过来 [IDFGH-5223]

Posted: Fri Feb 11, 2022 7:45 am
by ESP_Dazz
上述两个问题从 release/v4.4 开始已经修好了(commit)。