blob: 6c20026b35ac2a84af9300312cefbc12131adc9a [file] [log] [blame]
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#ifndef OPENTITAN_SW_DEVICE_LIB_TESTING_AON_TIMER_TESTUTILS_H_
#define OPENTITAN_SW_DEVICE_LIB_TESTING_AON_TIMER_TESTUTILS_H_
#include <stdint.h>
#include "sw/device/lib/dif/dif_aon_timer.h"
/**
* Configure wakeup counter for a number of AON clock cycles.
* @param cycles The number of AON clock cycles.
*/
void aon_timer_testutils_wakeup_config(const dif_aon_timer_t *aon_timer,
uint32_t cycles);
/**
* Configure watchdog counter in number of AON clock cycles.
*
* The watchdog counter is set without locking it, and configured so it doesn't
* pause for low power.
* @param bark_cycles The number of AON clock cycles till barking.
* @param bite_cycles The number of AON clock cycles till biting.
* @param pause_in_sleep Don't increment while sleeping.
*/
void aon_timer_testutils_watchdog_config(const dif_aon_timer_t *aon_timer,
uint32_t bark_cycles,
uint32_t bite_cycles,
bool pause_in_sleep);
#endif // OPENTITAN_SW_DEVICE_LIB_TESTING_AON_TIMER_TESTUTILS_H_