Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/counter nrfx: Fix with DT instance not matching device instance #69966

Merged

Conversation

aescolar
Copy link
Member

@aescolar aescolar commented Mar 8, 2024

478530e introduced a bug where if the DT index while iterating its DT structure initialization does not match the actual peripheral instance, or if the device instance string is not just a simple integer, but a more complex string like "00", or "02", either the wrong peripheral address would be used, or the file would failt to compile.

Let's fix this by reverting that change, and instead, for simulation converting the hardcoded DT/real HW address to the valid addr for simulation on the fly.

Fixes #69216

@aescolar aescolar requested review from nordic-krch and anangl March 8, 2024 12:17
@aescolar aescolar force-pushed the nrfbsim_counter_driver_fix branch from 0abc5f1 to 9477bba Compare March 8, 2024 12:38
@zephyrbot
Copy link
Collaborator

zephyrbot commented Mar 8, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
nrf_hw_models zephyrproject-rtos/nrf_hw_models@52d0b4b 319e3ebd3134935c330980dfac53d05d28c0af9a zephyrproject-rtos/nrf_hw_models@52d0b4b7..319e3ebd

Note: This message is automatically posted and updated by the Manifest GitHub Action.

gmarull
gmarull previously approved these changes Mar 8, 2024
@aescolar aescolar marked this pull request as ready for review March 8, 2024 12:51
anangl
anangl previously approved these changes Mar 8, 2024
nordic-krch
nordic-krch previously approved these changes Mar 8, 2024
aescolar added 2 commits March 8, 2024 16:22
* Update the HW models module to
3925b7030736f25f45ceedc3621219125a2d4685

Including the following:
* 3925b70: Add new API to convert real peripheral addr to simulated one
* 319e3eb: nhw_convert_periph_base_addr: Fix include for nrf5340

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
478530e introduced a bug
where if the DT index while iterating its DT structure
initialization does not match the actual peripheral instance,
or if the device instance string is not just a simple integer,
but a more complex string like "00", or "02", either
the wrong peripheral address would be used, or the file
would failt to compile.

Let's fix this by reverting that change, and instead, for
simulation converting the hardcoded DT/real HW address
to the valid addr for simulation on the fly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
@aescolar aescolar dismissed stale reviews from nordic-krch, anangl, and gmarull via af4f022 March 8, 2024 15:23
@aescolar aescolar force-pushed the nrfbsim_counter_driver_fix branch from b1fdfd0 to af4f022 Compare March 8, 2024 15:23
@fabiobaltieri fabiobaltieri merged commit f9d5e84 into zephyrproject-rtos:main Mar 11, 2024
24 checks passed
@aescolar aescolar deleted the nrfbsim_counter_driver_fix branch March 11, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

driver: Timer / Counter initialization incorrect for timer2 with BLE on nRF52840
6 participants