drivers: udc_dwc2: Fix debug logging bus fault

Pass DIEPTXF address instead of value to sys_read32() to prevent bus
fault when debug logging is enabled.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
This commit is contained in:
Tomasz Moń 2024-05-14 07:12:50 +02:00 committed by Carles Cufí
commit 3a8c9b8ac3

View file

@ -1168,7 +1168,7 @@ static int udc_dwc2_ep_enable(const struct device *dev,
for (uint8_t i = 1U; i < priv->ineps; i++) { for (uint8_t i = 1U; i < priv->ineps; i++) {
LOG_DBG("DIEPTXF%u %08x DIEPCTL%u %08x", LOG_DBG("DIEPTXF%u %08x DIEPCTL%u %08x",
i, sys_read32((mem_addr_t)base->dieptxf[i - 1U]), i, dxepctl); i, sys_read32((mem_addr_t)&base->dieptxf[i - 1U]), i, dxepctl);
} }
return 0; return 0;