70 lines
2.5 KiB
C
70 lines
2.5 KiB
C
/****************************************************************************
|
|
|
|
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 __ATE_MAIN_H
|
|
#define __ATE_MAIN_H
|
|
|
|
#include "os_types.h"
|
|
|
|
#pragma pack(push) /* save the pack status */
|
|
#pragma pack(1) /* 1 byte align */
|
|
|
|
/* case branch */
|
|
// 6: ana&&flash 1:efuse
|
|
#define ATE_TEST_CASE_ID (6)
|
|
#define ATE_DEBUG_LEVEL (0)
|
|
#define ATE_FUSE_INFO_EN (0)
|
|
|
|
/* ATE software version */
|
|
#define ATE_SW_VER ("SW_V0.1_20190215")
|
|
|
|
#define REG8(a) (*((volatile uint8_t *)(a)))
|
|
#define REG32(a) (*((volatile uint32_t *)(a)))
|
|
|
|
#define ERR_BIT(a) (0x00000001<<(a)) // | 0x00000002)
|
|
|
|
typedef enum _iot_ftm_result {
|
|
ATE_TEST_OK = 0x01,
|
|
ATE_TEST_FAIL = 0xFF,
|
|
} iot_ftm_result_t;
|
|
|
|
typedef enum _iot_ate_flags {
|
|
ATE_FLAG_OK = 0x0, // TEST OK
|
|
ATE_DDR_FAIL_FREQ = 0x1, // swtich cpu freqence failed
|
|
ATE_DDR_FAIL_INIT = 0x2, // ddr training failed
|
|
ATE_DDR_FAIL_BOND = 0x3, // ddr bond test
|
|
ATE_FLASH_FAIL_BOND = 0x4, // flash bond test
|
|
ATE_FLASH_FAIL_ID = 0x5, // flash id failed
|
|
ATE_FLASH_FAIL_INIT = 0x6, // flash init failed
|
|
ATE_FLASH_FAIL_QUAD = 0x7, // flash quad mode failed
|
|
ATE_FLASH_FAIL_ERASE = 0x8, // flash erase failed
|
|
ATE_FLASH_FAIL_PRGM = 0x9, // flash program failed
|
|
ATE_FLASH_FAIL_READ = 0x10, // flash read failed
|
|
} iot_ate_flags;
|
|
|
|
/* ate total info structure:512byte start from 0xfff8000 */
|
|
typedef struct _ate_info {
|
|
uint32_t result;
|
|
uint32_t flags;
|
|
uint32_t cnt;
|
|
uint8_t sw_version[22];
|
|
uint8_t mac[6];
|
|
uint32_t chip_id;
|
|
} ate_info_t;
|
|
|
|
#pragma pack(pop) /* restore the pack status */
|
|
|
|
#endif // !__ATE_MAIN_H
|