Classes | Macros | Functions
nmasic.h File Reference

This module contains WINC3400 ASIC specific internal APIs. More...

#include "common/include/nm_common.h"
Include dependency graph for nmasic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tstrGpRegs
 

Macros

#define BOOTROM_REG   (0xc000c)
 
#define CHIP_ID_3000D   (0x3000D0)
 
#define EFUSED_MAC(value)   (value & 0xffff0000)
 
#define GET_CHIPID()   nmi_get_chipid()
 
#define ISNMC1000(id)   (((id & 0xfffff000) == 0x100000) ? 1 : 0)
 
#define ISNMC1500(id)   (((id & 0xfffff000) == 0x150000) ? 1 : 0)
 
#define ISNMC3400(id)   (((id & 0xfff0f000) == 0x300000) ? 1 : 0)
 
#define M2M_ATE_FW_IS_UP_VALUE   (0xD75DC1C3) /*Also, Change this value in ATE (Burst) firmware if it will be changed here*/
 
#define M2M_ATE_FW_START_VALUE   (0x3C1CD57D) /*Also, Change this value in boot_firmware if it will be changed here*/
 
#define M2M_FINISH_BOOT_ROM   0x10add09eUL
 
#define M2M_FINISH_INIT_STATE   0x02532636UL
 
#define M2M_START_FIRMWARE   0xef522f61UL
 
#define M2M_START_PS_FIRMWARE   0x94992610UL
 
#define M2M_WAIT_FOR_HOST_REG   (0x207bc)
 
#define NMI_CHIPID   (NMI_PERIPH_REG_BASE)
 
#define NMI_PERIPH_REG_BASE   0x1000
 
#define NMI_REV_REG   (0x207ac) /*Also, Used to load ATE firmware from SPI Flash and to ensure that it is running too*/
 
#define NMI_STATE_REG   (0x108c)
 
#define REV(id)   ( ((id) & 0x00000fff ) )
 
#define REV_2B0   (0x2B0)
 
#define REV_3A0   (0x3A0)
 
#define REV_B0   (0x2B0)
 
#define rHAVE_EXT_PA_INV_TX_RX   (NBIT4)
 
#define rHAVE_LEGACY_RF_SETTINGS   (NBIT5)
 
#define rHAVE_LOGS_DISABLED_BIT   (NBIT6)
 
#define rHAVE_SDIO_IRQ_GPIO_BIT   (NBIT0)
 
#define rHAVE_SLEEP_CLK_SRC_RTC_BIT   (NBIT2)
 
#define rHAVE_SLEEP_CLK_SRC_XO_BIT   (NBIT3)
 
#define rHAVE_USE_PMU_BIT   (NBIT1)
 
#define rNMI_BOOT_RESET_MUX   (0x1118)
 
#define rNMI_GLB_RESET   (0x1400)
 
#define rNMI_GP_REG_0   (0x149c)
 
#define rNMI_GP_REG_1   (0x14A0)
 

Functions

sint8 chip_apply_conf (uint32 u32conf)
 
sint8 chip_deinit (void)
 
void chip_idle (void)
 
sint8 chip_reset (void)
 
sint8 chip_reset_and_cpu_halt (void)
 
sint8 chip_wake (void)
 
sint8 cpu_start (void)
 
sint8 enable_interrupts (void)
 
void enable_rf_blocks (void)
 
sint8 get_gpio_val (uint8 gpio, uint8 *val)
 
sint8 nm_clkless_wake (void)
 Wakeup the chip using clockless registers. More...
 
uint32 nmi_get_chipid (void)
 
sint8 nmi_get_mac_address (uint8 *pu8MacAddr)
 
sint8 nmi_get_otp_mac_address (uint8 *pu8MacAddr, uint8 *pu8IsValid)
 
uint32 nmi_get_rfrevid (void)
 
void nmi_set_sys_clk_src_to_xo (void)
 
void nmi_update_pll (void)
 
sint8 pullup_ctrl (uint32 pinmask, uint8 enable)
 
void restore_pmu_settings_after_global_reset (void)
 
sint8 set_gpio_dir (uint8 gpio, uint8 dir)
 
sint8 set_gpio_val (uint8 gpio, uint8 val)
 
sint8 wait_for_bootrom (uint8)
 
sint8 wait_for_firmware_start (uint8)
 

Detailed Description

This module contains WINC3400 ASIC specific internal APIs.

Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.

Definition in file nmasic.h.

Macro Definition Documentation

◆ BOOTROM_REG

#define BOOTROM_REG   (0xc000c)

Definition at line 46 of file nmasic.h.

◆ CHIP_ID_3000D

#define CHIP_ID_3000D   (0x3000D0)

Definition at line 60 of file nmasic.h.

◆ EFUSED_MAC

#define EFUSED_MAC (   value)    (value & 0xffff0000)

Definition at line 67 of file nmasic.h.

◆ GET_CHIPID

#define GET_CHIPID ( )    nmi_get_chipid()

Definition at line 62 of file nmasic.h.

◆ ISNMC1000

#define ISNMC1000 (   id)    (((id & 0xfffff000) == 0x100000) ? 1 : 0)

Definition at line 63 of file nmasic.h.

◆ ISNMC1500

#define ISNMC1500 (   id)    (((id & 0xfffff000) == 0x150000) ? 1 : 0)

Definition at line 64 of file nmasic.h.

◆ ISNMC3400

#define ISNMC3400 (   id)    (((id & 0xfff0f000) == 0x300000) ? 1 : 0)

Definition at line 65 of file nmasic.h.

◆ M2M_ATE_FW_IS_UP_VALUE

#define M2M_ATE_FW_IS_UP_VALUE   (0xD75DC1C3) /*Also, Change this value in ATE (Burst) firmware if it will be changed here*/

Definition at line 55 of file nmasic.h.

◆ M2M_ATE_FW_START_VALUE

#define M2M_ATE_FW_START_VALUE   (0x3C1CD57D) /*Also, Change this value in boot_firmware if it will be changed here*/

Definition at line 54 of file nmasic.h.

◆ M2M_FINISH_BOOT_ROM

#define M2M_FINISH_BOOT_ROM   0x10add09eUL

Definition at line 50 of file nmasic.h.

◆ M2M_FINISH_INIT_STATE

#define M2M_FINISH_INIT_STATE   0x02532636UL

Definition at line 49 of file nmasic.h.

◆ M2M_START_FIRMWARE

#define M2M_START_FIRMWARE   0xef522f61UL

Definition at line 51 of file nmasic.h.

◆ M2M_START_PS_FIRMWARE

#define M2M_START_PS_FIRMWARE   0x94992610UL

Definition at line 52 of file nmasic.h.

◆ M2M_WAIT_FOR_HOST_REG

#define M2M_WAIT_FOR_HOST_REG   (0x207bc)

Definition at line 48 of file nmasic.h.

◆ NMI_CHIPID

#define NMI_CHIPID   (NMI_PERIPH_REG_BASE)

Definition at line 40 of file nmasic.h.

◆ NMI_PERIPH_REG_BASE

#define NMI_PERIPH_REG_BASE   0x1000

Definition at line 39 of file nmasic.h.

◆ NMI_REV_REG

#define NMI_REV_REG   (0x207ac) /*Also, Used to load ATE firmware from SPI Flash and to ensure that it is running too*/

Definition at line 47 of file nmasic.h.

◆ NMI_STATE_REG

#define NMI_STATE_REG   (0x108c)

Definition at line 45 of file nmasic.h.

◆ REV

#define REV (   id)    ( ((id) & 0x00000fff ) )

Definition at line 66 of file nmasic.h.

◆ REV_2B0

#define REV_2B0   (0x2B0)

Definition at line 57 of file nmasic.h.

◆ REV_3A0

#define REV_3A0   (0x3A0)

Definition at line 59 of file nmasic.h.

◆ REV_B0

#define REV_B0   (0x2B0)

Definition at line 58 of file nmasic.h.

◆ rHAVE_EXT_PA_INV_TX_RX

#define rHAVE_EXT_PA_INV_TX_RX   (NBIT4)

Definition at line 73 of file nmasic.h.

◆ rHAVE_LEGACY_RF_SETTINGS

#define rHAVE_LEGACY_RF_SETTINGS   (NBIT5)

Definition at line 74 of file nmasic.h.

◆ rHAVE_LOGS_DISABLED_BIT

#define rHAVE_LOGS_DISABLED_BIT   (NBIT6)

Definition at line 75 of file nmasic.h.

◆ rHAVE_SDIO_IRQ_GPIO_BIT

#define rHAVE_SDIO_IRQ_GPIO_BIT   (NBIT0)

Definition at line 69 of file nmasic.h.

◆ rHAVE_SLEEP_CLK_SRC_RTC_BIT

#define rHAVE_SLEEP_CLK_SRC_RTC_BIT   (NBIT2)

Definition at line 71 of file nmasic.h.

◆ rHAVE_SLEEP_CLK_SRC_XO_BIT

#define rHAVE_SLEEP_CLK_SRC_XO_BIT   (NBIT3)

Definition at line 72 of file nmasic.h.

◆ rHAVE_USE_PMU_BIT

#define rHAVE_USE_PMU_BIT   (NBIT1)

Definition at line 70 of file nmasic.h.

◆ rNMI_BOOT_RESET_MUX

#define rNMI_BOOT_RESET_MUX   (0x1118)

Definition at line 44 of file nmasic.h.

◆ rNMI_GLB_RESET

#define rNMI_GLB_RESET   (0x1400)

Definition at line 43 of file nmasic.h.

◆ rNMI_GP_REG_0

#define rNMI_GP_REG_0   (0x149c)

Definition at line 41 of file nmasic.h.

◆ rNMI_GP_REG_1

#define rNMI_GP_REG_1   (0x14A0)

Definition at line 42 of file nmasic.h.

Function Documentation

◆ chip_apply_conf()

sint8 chip_apply_conf ( uint32  u32conf)

Definition at line 60 of file nmasic.c.

◆ chip_deinit()

sint8 chip_deinit ( void  )

stop the firmware, need a re-download

Definition at line 566 of file nmasic.c.

◆ chip_idle()

void chip_idle ( void  )

Definition at line 189 of file nmasic.c.

◆ chip_reset()

sint8 chip_reset ( void  )

Definition at line 450 of file nmasic.c.

◆ chip_reset_and_cpu_halt()

sint8 chip_reset_and_cpu_halt ( void  )

Definition at line 416 of file nmasic.c.

◆ chip_wake()

sint8 chip_wake ( void  )

Definition at line 405 of file nmasic.c.

◆ cpu_start()

sint8 cpu_start ( void  )

reset regs

Go...

Definition at line 244 of file nmasic.c.

◆ enable_interrupts()

sint8 enable_interrupts ( void  )

interrupt pin mux select

interrupt enable

Definition at line 213 of file nmasic.c.

◆ enable_rf_blocks()

void enable_rf_blocks ( void  )

Definition at line 200 of file nmasic.c.

◆ get_gpio_val()

sint8 get_gpio_val ( uint8  gpio,
uint8 val 
)

◆ nm_clkless_wake()

sint8 nm_clkless_wake ( void  )

Wakeup the chip using clockless registers.

Returns
M2M_SUCCESS in case of success and M2M_ERR_BUS_FAIL in case of failure
Author
Samer Sarhan
Date
06 June 2014
Version
1.0
Returns
ZERO in case of success and M2M_ERR_BUS_FAIL in case of failure
Author
Samer Sarhan

Definition at line 106 of file nmasic.c.

◆ nmi_get_chipid()

uint32 nmi_get_chipid ( void  )

Definition at line 278 of file nmasic.c.

◆ nmi_get_mac_address()

sint8 nmi_get_mac_address ( uint8 pu8MacAddr)

Definition at line 719 of file nmasic.c.

◆ nmi_get_otp_mac_address()

sint8 nmi_get_otp_mac_address ( uint8 pu8MacAddr,
uint8 pu8IsValid 
)

Definition at line 687 of file nmasic.c.

◆ nmi_get_rfrevid()

uint32 nmi_get_rfrevid ( void  )

Definition at line 360 of file nmasic.c.

◆ nmi_set_sys_clk_src_to_xo()

void nmi_set_sys_clk_src_to_xo ( void  )

Definition at line 393 of file nmasic.c.

◆ nmi_update_pll()

void nmi_update_pll ( void  )

Definition at line 382 of file nmasic.c.

◆ pullup_ctrl()

sint8 pullup_ctrl ( uint32  pinmask,
uint8  enable 
)

◆ restore_pmu_settings_after_global_reset()

void restore_pmu_settings_after_global_reset ( void  )

Definition at line 370 of file nmasic.c.

◆ set_gpio_dir()

sint8 set_gpio_dir ( uint8  gpio,
uint8  dir 
)

◆ set_gpio_val()

sint8 set_gpio_val ( uint8  gpio,
uint8  val 
)

◆ wait_for_bootrom()

sint8 wait_for_bootrom ( uint8  )

Definition at line 469 of file nmasic.c.

◆ wait_for_firmware_start()

sint8 wait_for_firmware_start ( uint8  )

Definition at line 528 of file nmasic.c.



inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:59