47 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
/****************************************************************************
 | 
						|
 | 
						|
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
 | 
						|
 | 
						|
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
 | 
						|
be copied by any method or incorporated into another program without
 | 
						|
the express written consent of Aerospace C.Power. This Information or any portion
 | 
						|
thereof remains the property of Aerospace C.Power. The Information contained herein
 | 
						|
is believed to be accurate and Aerospace C.Power assumes no responsibility or
 | 
						|
liability for its use in any way and conveys no license or title under
 | 
						|
any patent or copyright and makes no representation or warranty that this
 | 
						|
Information is free from patent or copyright infringement.
 | 
						|
 | 
						|
****************************************************************************/
 | 
						|
#ifndef __HW_SADC_H
 | 
						|
#define __HW_SADC_H
 | 
						|
 | 
						|
#define DT_SADC_POLLING_EN          (1)
 | 
						|
#define DT_SADC_MTR_SEL_SCL_EN      (0)
 | 
						|
#define DT_VOL_TRANSFORMER_SUPPORT  (1)
 | 
						|
 | 
						|
#define DT_SADC_CURRENT_MODE        (0)
 | 
						|
#define DT_SADC_VOL_MODE            (1)
 | 
						|
#define DT_SADC_DUAL_7PHASE_MODE    (2)
 | 
						|
#define DT_SADC_DUAL_13PHASE_MODE   (3)
 | 
						|
#define DT_SADC_TEST_MODE           DT_SADC_DUAL_13PHASE_MODE
 | 
						|
 | 
						|
#define DT_SADC_CURR_OHM_VAL        (100)
 | 
						|
#define DT_SADC_CT_RATIO            (4000)
 | 
						|
#define DT_SADC_SUM_NUM             (50)
 | 
						|
#define DT_SADC_REF_VOL_V           (0.35)
 | 
						|
#define DT_SADC_REF_SUM_DATA        (118000)
 | 
						|
#define DT_SADC_DIV_SQRT_2          (0.70710678)
 | 
						|
#define DT_SADC_VOL_R_NUM           (4)
 | 
						|
#define DT_SADC_COL_R_CAL           (47000)
 | 
						|
#define DT_SADC_VOL_R_SHARE         (50)
 | 
						|
#define DT_SADC_SAMPLE_QUANTITY     (500)
 | 
						|
#define DT_SADC_SAMPLE_PHASE_NUM    (7)
 | 
						|
 | 
						|
#define TEST_DESC_NUM               (10) /* RX = TX = TEST_DESC_NUM */
 | 
						|
#define TEST_BUF_SIZE               (64) /* Each buffer has this size */
 | 
						|
 | 
						|
#define DMA_TEST_DEVICE             DMA_DEV_UART0//  DMA_DEV_SPI0
 | 
						|
 | 
						|
 | 
						|
#endif
 |