Microchip® Advanced Software Framework

winc3400/wifi_drv/driver/source/nmasic.c File Reference

This module contains WINC3400 ASIC specific internal APIs.

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

#include "common/include/nm_common.h"
#include "driver/source/nmbus.h"
#include "bsp/include/nm_bsp.h"
#include "driver/source/nmasic.h"
#include "driver/include/m2m_types.h"

Macros

#define CLOCKS_EN_REG   (0x13)
 
#define CORT_HOST_COMM   (0x14)
 
#define GET_UINT32(X, Y)   (X[0+Y] + ((uint32)X[1+Y]<<8) + ((uint32)X[2+Y]<<16) +((uint32)X[3+Y]<<24))
 
#define HOST_CORT_COMM   (0x0e)
 
#define NMI_GLB_RESET_0   (NMI_PERIPH_REG_BASE + 0x400)
 
#define NMI_INTR_ENABLE   (NMI_INTR_REG_BASE)
 
#define NMI_INTR_REG_BASE   (NMI_PERIPH_REG_BASE + 0xa00)
 
#define NMI_PIN_MUX_0   (NMI_PERIPH_REG_BASE + 0x408)
 
#define rBT_CHIP_ID_REG   (0x3b0000)
 
#define TIMEOUT   (2000)
 
#define WAKE_CLK_REG   (0x1)
 
#define WAKEUP_TRIALS   (4)
 

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_sleep (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)
 
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 arg)
 
sint8 wait_for_firmware_start (uint8 arg)
 

#define CLOCKS_EN_REG   (0x13)

Referenced by chip_wake().

#define CORT_HOST_COMM   (0x14)

Referenced by chip_sleep().

#define GET_UINT32 (   X,
  Y 
)    (X[0+Y] + ((uint32)X[1+Y]<<8) + ((uint32)X[2+Y]<<16) +((uint32)X[3+Y]<<24))
#define HOST_CORT_COMM   (0x0e)

Referenced by chip_sleep(), and chip_wake().

#define NMI_GLB_RESET_0   (NMI_PERIPH_REG_BASE + 0x400)
#define NMI_INTR_ENABLE   (NMI_INTR_REG_BASE)

Referenced by enable_interrupts().

#define NMI_INTR_REG_BASE   (NMI_PERIPH_REG_BASE + 0xa00)
#define NMI_PIN_MUX_0   (NMI_PERIPH_REG_BASE + 0x408)
#define rBT_CHIP_ID_REG   (0x3b0000)

Referenced by nmi_get_chipid().

#define TIMEOUT   (2000)
#define WAKE_CLK_REG   (0x1)

Referenced by chip_idle(), chip_sleep(), and chip_wake().

#define WAKEUP_TRIALS   (4)

Referenced by chip_wake().

sint8 chip_apply_conf ( uint32  u32Conf)

Referenced by wait_for_bootrom().

sint8 chip_deinit ( void  )

stop the firmware, need a re-download

Referenced by nm_drv_deinit().

void chip_idle ( void  )

Referenced by nm_drv_init_hold().

sint8 chip_reset ( void  )
sint8 chip_reset_and_cpu_halt ( void  )
sint8 chip_sleep ( void  )

Referenced by hif_chip_sleep().

sint8 chip_wake ( void  )
sint8 cpu_start ( void  )

reset regs

Go...

Referenced by nm_cpu_start(), and nm_drv_init_start().

sint8 enable_interrupts ( void  )

interrupt pin mux select

interrupt enable

Referenced by m2m_wifi_download_mode(), and nm_drv_init_start().

void enable_rf_blocks ( void  )

References nm_bsp_sleep(), and nm_write_reg().

sint8 get_gpio_val ( uint8  gpio,
uint8 val 
)

Referenced by gpio_ioctl().

sint8 nmi_get_mac_address ( uint8 pu8MacAddr)
sint8 nmi_get_otp_mac_address ( uint8 pu8MacAddr,
uint8 pu8IsValid 
)
uint32 nmi_get_rfrevid ( void  )

Referenced by main().

void nmi_set_sys_clk_src_to_xo ( void  )
void nmi_update_pll ( void  )
sint8 pullup_ctrl ( uint32  pinmask,
uint8  enable 
)

Referenced by m2m_periph_pullup_ctrl().

void restore_pmu_settings_after_global_reset ( void  )

Referenced by chip_reset().

sint8 set_gpio_dir ( uint8  gpio,
uint8  dir 
)

Referenced by gpio_ioctl().

sint8 set_gpio_val ( uint8  gpio,
uint8  val 
)

Referenced by gpio_ioctl().

sint8 wait_for_bootrom ( uint8  arg)

Referenced by nm_drv_init_start().

sint8 wait_for_firmware_start ( uint8  arg)

Referenced by nm_drv_init_start().