@@ -271,6 +271,7 @@ struct uarte_nrfx_data {
271
271
#endif
272
272
#ifdef UARTE_ANY_ASYNC
273
273
struct uarte_async_cb * async ;
274
+ nrfx_timer_t timer ;
274
275
#endif
275
276
atomic_val_t poll_out_lock ;
276
277
atomic_t flags ;
@@ -386,7 +387,6 @@ struct uarte_nrfx_config {
386
387
#endif /* CONFIG_UART_USE_RUNTIME_CONFIGURE */
387
388
388
389
#ifdef UARTE_ANY_ASYNC
389
- nrfx_timer_t timer ;
390
390
uint8_t * tx_cache ;
391
391
uint8_t * rx_flush_buf ;
392
392
#endif
@@ -795,7 +795,7 @@ static void uarte_periph_enable(const struct device *dev)
795
795
#ifdef UARTE_ANY_ASYNC
796
796
if (data -> async ) {
797
797
if (HW_RX_COUNTING_ENABLED (config )) {
798
- const nrfx_timer_t * timer = & config -> timer ;
798
+ nrfx_timer_t * timer = & data -> timer ;
799
799
800
800
nrfx_timer_enable (timer );
801
801
@@ -2777,8 +2777,8 @@ static int uarte_instance_deinit(const struct device *dev)
2777
2777
(.tx_cache = uarte##idx##_tx_cache, \
2778
2778
.rx_flush_buf = uarte##idx##_flush_buf,)) \
2779
2779
IF_ENABLED(CONFIG_UART_##idx##_NRF_HW_ASYNC, \
2780
- (.timer = NRFX_TIMER_INSTANCE( \
2781
- CONFIG_UART_##idx##_NRF_HW_ASYNC_TIMER),)) \
2780
+ (.timer = NRFX_TIMER_INSTANCE(NRF_TIMER_INST_GET( \
2781
+ CONFIG_UART_##idx##_NRF_HW_ASYNC_TIMER)) ,)) \
2782
2782
IF_ENABLED(INSTANCE_IS_FAST(_, /*empty*/ , idx , _), \
2783
2783
(.clk_dev = DEVICE_DT_GET_OR_NULL(DT_CLOCKS_CTLR(UARTE(idx))), \
2784
2784
.clk_spec = { \
0 commit comments