nmasic.h
Go to the documentation of this file.
1 
34 #ifndef _NMASIC_H_
35 #define _NMASIC_H_
36 
38 
39 #define NMI_PERIPH_REG_BASE 0x1000
40 #define NMI_CHIPID (NMI_PERIPH_REG_BASE)
41 #define rNMI_GP_REG_0 (0x149c)
42 #define rNMI_GP_REG_1 (0x14A0)
43 #define rNMI_GLB_RESET (0x1400)
44 #define rNMI_BOOT_RESET_MUX (0x1118)
45 #define NMI_STATE_REG (0x108c)
46 #define BOOTROM_REG (0xc000c)
47 #define NMI_REV_REG (0x207ac) /*Also, Used to load ATE firmware from SPI Flash and to ensure that it is running too*/
48 #define M2M_WAIT_FOR_HOST_REG (0x207bc)
49 #define M2M_FINISH_INIT_STATE 0x02532636UL
50 #define M2M_FINISH_BOOT_ROM 0x10add09eUL
51 #define M2M_START_FIRMWARE 0xef522f61UL
52 #define M2M_START_PS_FIRMWARE 0x94992610UL
53 
54 #define M2M_ATE_FW_START_VALUE (0x3C1CD57D) /*Also, Change this value in boot_firmware if it will be changed here*/
55 #define M2M_ATE_FW_IS_UP_VALUE (0xD75DC1C3) /*Also, Change this value in ATE (Burst) firmware if it will be changed here*/
56 
57 #define REV_2B0 (0x2B0)
58 #define REV_B0 (0x2B0)
59 #define REV_3A0 (0x3A0)
60 #define CHIP_ID_3000D (0x3000D0)
61 
62 #define GET_CHIPID() nmi_get_chipid()
63 #define ISNMC1000(id) (((id & 0xfffff000) == 0x100000) ? 1 : 0)
64 #define ISNMC1500(id) (((id & 0xfffff000) == 0x150000) ? 1 : 0)
65 #define ISNMC3400(id) (((id & 0xfff0f000) == 0x300000) ? 1 : 0)
66 #define REV(id) ( ((id) & 0x00000fff ) )
67 #define EFUSED_MAC(value) (value & 0xffff0000)
68 
69 #define rHAVE_SDIO_IRQ_GPIO_BIT (NBIT0)
70 #define rHAVE_USE_PMU_BIT (NBIT1)
71 #define rHAVE_SLEEP_CLK_SRC_RTC_BIT (NBIT2)
72 #define rHAVE_SLEEP_CLK_SRC_XO_BIT (NBIT3)
73 #define rHAVE_EXT_PA_INV_TX_RX (NBIT4)
74 #define rHAVE_LEGACY_RF_SETTINGS (NBIT5)
75 #define rHAVE_LOGS_DISABLED_BIT (NBIT6)
76 
77 typedef struct{
80 }tstrGpRegs;
81 
82 #ifdef __cplusplus
83  extern "C" {
84  #endif
85 
92 
93 sint8 chip_wake(void);
94 
95 void chip_idle(void);
96 
97 void enable_rf_blocks(void);
98 
100 
101 sint8 cpu_start(void);
102 
103 uint32 nmi_get_chipid(void);
104 
105 uint32 nmi_get_rfrevid(void);
106 
108 
109 void nmi_update_pll(void);
110 
111 void nmi_set_sys_clk_src_to_xo(void);
112 
113 sint8 chip_reset(void);
114 
116 
118 
119 sint8 chip_deinit(void);
120 
122 
123 sint8 set_gpio_dir(uint8 gpio, uint8 dir);
124 
125 sint8 set_gpio_val(uint8 gpio, uint8 val);
126 
127 sint8 get_gpio_val(uint8 gpio, uint8* val);
128 
129 sint8 pullup_ctrl(uint32 pinmask, uint8 enable);
130 
131 sint8 nmi_get_otp_mac_address(uint8 *pu8MacAddr, uint8 * pu8IsValid);
132 
133 sint8 nmi_get_mac_address(uint8 *pu8MacAddr);
134 
135 sint8 chip_apply_conf(uint32 u32conf);
136 
137 #ifdef __cplusplus
138  }
139  #endif
140 
141 #endif /*_NMASIC_H_*/
void enable_rf_blocks(void)
Definition: nmasic.c:200
This module contains common APIs declarations.
sint8 get_gpio_val(uint8 gpio, uint8 *val)
uint32 u32Firmware_Ota_rev
Definition: nmasic.h:79
signed char sint8
Range of values between -128 to 127.
Definition: nm_bsp.h:111
sint8 chip_deinit(void)
Definition: nmasic.c:566
uint32 u32Mac_efuse_mib
Definition: nmasic.h:78
sint8 enable_interrupts(void)
Definition: nmasic.c:213
void nmi_set_sys_clk_src_to_xo(void)
Definition: nmasic.c:393
sint8 chip_reset(void)
Definition: nmasic.c:450
sint8 cpu_start(void)
Definition: nmasic.c:244
void nmi_update_pll(void)
Definition: nmasic.c:382
sint8 chip_wake(void)
Definition: nmasic.c:405
uint32 nmi_get_chipid(void)
Definition: nmasic.c:278
void chip_idle(void)
Definition: nmasic.c:189
sint8 wait_for_firmware_start(uint8)
Definition: nmasic.c:528
sint8 nmi_get_mac_address(uint8 *pu8MacAddr)
Definition: nmasic.c:719
sint8 set_gpio_val(uint8 gpio, uint8 val)
sint8 wait_for_bootrom(uint8)
Definition: nmasic.c:469
sint8 nm_clkless_wake(void)
Wakeup the chip using clockless registers.
Definition: nmasic.c:106
sint8 set_gpio_dir(uint8 gpio, uint8 dir)
void restore_pmu_settings_after_global_reset(void)
Definition: nmasic.c:370
unsigned long uint32
Range of values between 0 to 4294967295.
Definition: nm_bsp.h:103
sint8 pullup_ctrl(uint32 pinmask, uint8 enable)
sint8 chip_reset_and_cpu_halt(void)
Definition: nmasic.c:416
unsigned char uint8
Range of values between 0 to 255.
Definition: nm_bsp.h:89
sint8 chip_apply_conf(uint32 u32conf)
Definition: nmasic.c:60
uint32 nmi_get_rfrevid(void)
Definition: nmasic.c:360
sint8 nmi_get_otp_mac_address(uint8 *pu8MacAddr, uint8 *pu8IsValid)
Definition: nmasic.c:687


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:04