| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /*-----------------------------------------------------------------------------
- * Name: CV_GenTimer.c
- * Purpose: CMSIS CORE validation tests implementation
- *-----------------------------------------------------------------------------
- * Copyright (c) 2017 ARM Limited. All rights reserved.
- *----------------------------------------------------------------------------*/
- #include "CV_Framework.h"
- #include "cmsis_cv.h"
- /*-----------------------------------------------------------------------------
- * Test implementation
- *----------------------------------------------------------------------------*/
- /*-----------------------------------------------------------------------------
- * Test cases
- *----------------------------------------------------------------------------*/
-
- /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
- void TC_GenTimer_CNTFRQ(void) {
- uint32_t cntfrq = __get_CNTFRQ();
- __set_CNTFRQ(cntfrq);
- ASSERT_TRUE(cntfrq == __get_CNTFRQ());
- }
- /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
- void TC_GenTimer_CNTP_TVAL(void) {
- uint32_t cntp_tval = __get_CNTP_TVAL();
- __set_CNTP_TVAL(cntp_tval);
- ASSERT_TRUE(cntp_tval >= __get_CNTP_TVAL());
- }
- /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
- void TC_GenTimer_CNTP_CTL(void) {
- uint32_t cntp_ctl = __get_CNTP_CTL();
- __set_CNTP_CTL(cntp_ctl);
- ASSERT_TRUE(cntp_ctl == __get_CNTP_CTL());
- }
|