Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

improving sdk_validation.h

Following my ticket Dynamic reconfiguration of peripheral HW from TWI to SPI, I realized that the header file sdk_validation.h could be improved.

Currently the conflict checking is disabled for all the peripheral registers boxes when NRFX_PRS_ENABLED is set. However, it is possible to use PRS for one of the boxes and not for the others that would be used in a fixed allocation without sharing.

So, the checking could be improved by checking box 0 conflicts only if neither NRFX_PRS_ENABLED, nor NRFX_PRS_BOX_0_ENABLED are set.

checking conflicts in box 1 would be done only if NRFX_PRS_ENABLED, nor NRFX_PRS_BOX_1_ENABLED are set.

etc…

This way not all the checking would be disabled altogether when NRFX_PRS_ENABLED is set, but only those needed.

Incidentally when NRFX_PRS_ENABLED is set and none of the NRFX_PRS_BOX_n_ENABLED's is set there should also be some warning. This is one problem I initially met to set only NRFX_PRS_ENABLED and not some NRFX_PRS_BOX_n_ENABLED, and the warning would have helped locate quicker the issue.

Related