Energy Micro IEC60355 Library Example Project 1.0 (internal use only!) GCC-Version
Example project demonstrating POST and BIST library functions

iec60335_class_b_ram_test.h

Go to the documentation of this file.
00001 /***************************************************************************/
00030 #ifndef __IEC60335_CLASS_B_RAM_TEST_H__
00031 #define __IEC60335_CLASS_B_RAM_TEST_H__
00032 
00038 #include "iec60335_class_b_typedef.h"
00039 
00040 #ifdef __cplusplus
00041 extern "C"
00042 {
00043 #endif /* __cplusplus */
00044 
00049 /* BIST RAM buffer size in Byte */
00050 #define IEC60335_RAM_buffersize    40
00051 #define IEC60335_RAM_SP_Offset     (0x20UL)
00052 
00055 /* ------------------------ */
00056 /* RAM test suite status definitions */
00057 #define TS_STA_RAM_BIST_OK          (0x00B00000UL)
00058 #define TS_STA_RAM_BIST_R0_FAULT    (0x00B10000UL)
00059 #define TS_STA_RAM_BIST_R1_FAULT    (0x00B20000UL)
00060 
00061 #define BLOCK_SEL_CORE              0x1
00062 #define BLOCK_SEL_PLINK             0x2
00063 
00064 /* RAM algo constants */
00065 #define initial_sp                  (*(uint32_t *) 0x00u)
00066 #define get_initial_sp              (*initial_sp)
00067 #define CORE_RAM_BASE_ADDR          IEC60335_RAM_START
00068 #define CORE_RAM_BASE_PTR           (volatile uint8_t *) CORE_RAM_BASE_ADDR
00069 #define CORE_RAM_MAX_BC             (1024 * 4 * 4)
00070 #define CORE_RAM_R0_EXP             0x0
00071 #define CORE_RAM_R1_EXP             (~CORE_RAM_R0_EXP)
00072 #define PLINK_RAM_BASE_ADDR         (0x40012200UL)
00073 #define PLINK_RAM_BASE_PTR          (volatile uint8_t *) PLINK_RAM_BASE_ADDR
00074 #define PLINK_RAM_MAX_BC            384
00075 #define PLINK_RAM_R0_EXP            0x0
00076 #define PLINK_RAM_R1_EXP            0xFF
00077 
00090 testResult_t IEC60335_ClassB_RAMtest(uint32_t startAddrs, uint32_t size, uint8_t block_sel);
00091 
00099 extern testResult_t IEC60335_ClassB_RAMtest_POST(void);
00100 
00109 extern testResult_t IEC60335_ClassB_RAMtest_BIST(uint32_t startAddr, uint32_t length);
00110 
00111 #ifdef __cplusplus
00112 }
00113 #endif /* __cplusplus */
00114 
00119 #endif  /* __IEC60335_CLASS_B_RAM_TEST_H__ */
00120 
00121 /************************************** EOF *********************************/