Macros | Functions | Variables
nmasic.c File Reference

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

#include "common/include/nm_common.h"
#include "driver/source/nmbus.h"
#include "bsp/include/nm_bsp.h"
#include "driver/source/nmasic.h"
Include dependency graph for nmasic.c:

Go to the source code of this file.

Macros

#define GET_UINT32(X, Y)   (X[0+Y] + ((uint32)X[1+Y]<<8) + ((uint32)X[2+Y]<<16) +((uint32)X[3+Y]<<24))
 
#define M2M_DISABLE_PS   0xD0UL
 
#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)
 

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 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)
 
void restore_pmu_settings_after_global_reset (void)
 
sint8 wait_for_bootrom (uint8 arg)
 
sint8 wait_for_firmware_start (uint8 arg)
 

Variables

static uint32 clk_status_reg_adr = 0x13
 

Detailed Description

This module contains WINC3400 ASIC specific internal APIs.

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

Definition in file nmasic.c.

Macro Definition Documentation

◆ GET_UINT32

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

Definition at line 44 of file nmasic.c.

◆ M2M_DISABLE_PS

#define M2M_DISABLE_PS   0xD0UL

Definition at line 50 of file nmasic.c.

◆ NMI_GLB_RESET_0

#define NMI_GLB_RESET_0   (NMI_PERIPH_REG_BASE + 0x400)

Definition at line 40 of file nmasic.c.

◆ NMI_INTR_ENABLE

#define NMI_INTR_ENABLE   (NMI_INTR_REG_BASE)

Definition at line 43 of file nmasic.c.

◆ NMI_INTR_REG_BASE

#define NMI_INTR_REG_BASE   (NMI_PERIPH_REG_BASE + 0xa00)

Definition at line 41 of file nmasic.c.

◆ NMI_PIN_MUX_0

#define NMI_PIN_MUX_0   (NMI_PERIPH_REG_BASE + 0x408)

Definition at line 42 of file nmasic.c.

◆ rBT_CHIP_ID_REG

#define rBT_CHIP_ID_REG   (0x3b0000)

◆ TIMEOUT

#define TIMEOUT   (2000)

Definition at line 49 of file nmasic.c.

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.

◆ nm_clkless_wake()

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.

◆ restore_pmu_settings_after_global_reset()

void restore_pmu_settings_after_global_reset ( void  )

Definition at line 370 of file nmasic.c.

◆ wait_for_bootrom()

sint8 wait_for_bootrom ( uint8  arg)

Definition at line 469 of file nmasic.c.

◆ wait_for_firmware_start()

sint8 wait_for_firmware_start ( uint8  arg)

Definition at line 528 of file nmasic.c.

Variable Documentation

◆ clk_status_reg_adr

uint32 clk_status_reg_adr = 0x13
static

Definition at line 58 of file nmasic.c.



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