Perform the following procedure to configure a chained counter:
- Select the counter pair to be used for chaining (N and N + 1).
- Set the SCTM_CTCR_WOT_j [2]CHAIN bit of counter N + 1 to 1.
- For the SCTM_CTCR_WOT_j register for counter N in the counter pair:
- Select which signal drives the counter function by writing the correct index to the SCTM_CTCR_WOT_j[23:16]INPSEL bit field.
- Configure the sampling scheme to be used by the counter (edge/level) by writing to the SCTM_CTCR_WOT_j [3]DURMODE bit (if required).
- Set the behavior for system state by writing to the SCTM_CTCR_WOT_j [5]IDLE and SCTM_CTCR_WOT_j [4]FREE bits (if required).
- Start the counter function by setting the SCTM_CTCR_WOT_j[0] ENBL bit to 1.