I am developing a product which uses one nRF5340 Timer in timer mode and another in Counter mode. Reading through the nRF5340 Product Specification v1.6 I have the following questions:
In Section 7.53.3 it seems to imply that the TASKS_CLEAR event will not take effect if the timer is stopped. Is this true? If this is true does the clear occur as soon as the timer is started?
I am using a timer to publish periodic events. I am setting one CC register to the desired period and use a CLEAR shortcut on that CC register. In Section 7.53.4 seem to imply that if I am using a prescaler (counting at less than 16 MHz) I should load the CC register with the desired period. However, if I am running the timer at 16 MHz if I should use that the full period, or one less? If I do use the full period and do a counter capture at the last tick, do I get a 0 or the full period which was loaded into the CC register?
Section 7.35.5.19 includes a LowPowerCounter setting which is not discussed in the earlier sections. For spacing on the formatting of the "This enumerator is deprecated" suggests it should not be used. However, in the bitfield definitions in the file nrf5340_application_bitfields.h is the following:
/* Bits 1..0 : Timer mode */
#define TIMER_MODE_MODE_Pos (0UL) /*!< Position of MODE field. */
#define TIMER_MODE_MODE_Msk (0x3UL << TIMER_MODE_MODE_Pos) /*!< Bit mask of MODE field. */
#define TIMER_MODE_MODE_Timer (0x0UL) /*!< Select Timer mode */
#define TIMER_MODE_MODE_Counter (0x1UL) /*!< Deprecated enumerator - Select Counter mode */
#define TIMER_MODE_MODE_LowPowerCounter (0x2UL) /*!< Select Low Power Counter mode */
Am I correct in assuming the comments for the TIMER_MODE_MODE_Counter value is incorrect and the TIMER_MODE_MODE_LowPowerCounter is the one deprecated?
Thank you