Describe the bug
UART instances initialize the timer_regs variable either from a hardware address via a timer property reference or directly from a NRF_TIMER{N} macro, if a CONFIG_UART_0_NRF_HW_ASYNC_TIMER kconfig exists.
|
.timer_regs = COND_CODE_1(UARTE_HAS_PROP(idx, timer), \ |
|
(UARTE_TIMER_REG(idx)), \ |
|
(COND_CODE_1(CONFIG_UART_##idx##_NRF_HW_ASYNC, \ |
|
(NRFX_CONCAT(NRF_TIMER, CONFIG_UART_##idx##_NRF_HW_ASYNC_TIMER)), \ |
|
(NULL)))), \ |
For babblesim, these two addresses are not equivalent, NRF_TIMER{N} is a pointer to the simulated peripheral in RAM, the hardware address is some invalid memory on the simulated platform. The driver attempts to map the hardware address back to the simulated peripheral:
|
if (cfg->timer_regs != NULL) { |
|
((struct uarte_nrfx_config *)dev->config)->timer_regs = |
|
nhw_convert_periph_base_addr(cfg->timer_regs); |
|
} |
But in the case where the pointer is already the simulated peripheral, this fails, instead setting cfg->timer_regs to NULL.
Regression
Steps to reproduce
No response
Relevant log output
d_03: @00:00:00.000000 ERROR: (modules/bsim_hw_models/nrf_hw_models/src/HW_models/NHW_misc.c:85): Could not find real peripheral addr 0x81c31d8
Impact
Annoyance – Minor irritation; no significant impact on usability or functionality.
Environment
Additional Context
Introduced in 6e65fbe
Describe the bug
UART instances initialize the
timer_regsvariable either from a hardware address via atimerproperty reference or directly from aNRF_TIMER{N}macro, if aCONFIG_UART_0_NRF_HW_ASYNC_TIMERkconfig exists.zephyr/drivers/serial/uart_nrfx_uarte.c
Lines 3173 to 3177 in 8fc67e6
For babblesim, these two addresses are not equivalent,
NRF_TIMER{N}is a pointer to the simulated peripheral in RAM, the hardware address is some invalid memory on the simulated platform. The driver attempts to map the hardware address back to the simulated peripheral:zephyr/drivers/serial/uart_nrfx_uarte.c
Lines 3116 to 3119 in 8fc67e6
But in the case where the pointer is already the simulated peripheral, this fails, instead setting
cfg->timer_regstoNULL.Regression
Steps to reproduce
No response
Relevant log output
Impact
Annoyance – Minor irritation; no significant impact on usability or functionality.
Environment
Additional Context
Introduced in 6e65fbe