Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
cascoda_bsp_secure.c File Reference
#include <arm_cmse.h>
#include <stdio.h>
#include "M2351.h"
#include "fmc.h"
#include "gpio.h"
#include "sys.h"
#include "timer.h"
#include "cascoda-bm/cascoda_interface.h"
#include "cascoda-bm/cascoda_types.h"
#include "cascoda_chili.h"
#include "cascoda_chili_gpio.h"
#include "cascoda_secure.h"
Include dependency graph for cascoda_bsp_secure.c:

Functions

__NONSECURE_ENTRY void CHILI_SetUseExternalClock (u8_t use_ext_clock)
 Set Use_external_clock flag. More...
 
__NONSECURE_ENTRY u8_t CHILI_GetUseExternalClock (void)
 Get Use_external_clock flag. More...
 
__NONSECURE_ENTRY void CHILI_SetEnableCommsInterface (u8_t enable_coms_interface)
 Set enable_comms_interface flag, used by CHILI_SystemReinit. More...
 
__NONSECURE_ENTRY u8_t CHILI_GetEnableCommsInterface (void)
 Get enable_comms_interface flag, used by CHILI_SystemReinit. More...
 
__NONSECURE_ENTRY void CHILI_SetSystemFrequency (fsys_mhz system_frequency)
 Set current system frequency. More...
 
__NONSECURE_ENTRY fsys_mhz CHILI_GetSystemFrequency (void)
 Get current system frequency. More...
 
__NONSECURE_ENTRY void CHILI_GetUID (uint32_t *uid_out)
 Get the 96-bit hardware unique ID. More...
 
__NONSECURE_ENTRY void CHILI_EnableSpiModuleClock (void)
 Enable SPI Clock. More...
 
__NONSECURE_ENTRY wakeup_reason BSP_GetWakeupReason (void)
 Reason MCU has woken up after reset. More...
 
__NONSECURE_ENTRY void BSP_WatchdogEnable (u32_t timeout_ms)
 Watchdog Enable. More...
 
__NONSECURE_ENTRY void BSP_WatchdogDisable (void)
 Watchdog Disable. More...
 
__NONSECURE_ENTRY void BSP_WatchdogReset (void)
 Watchdog Reset and Restart. More...
 
__NONSECURE_ENTRY u8_t BSP_IsWatchdogTriggered (void)
 Checks if the watchdog has been triggered, clears the warning if so. More...
 
__NONSECURE_ENTRY void BSP_Waiting (void)
 This function will be called repeatedly when the Baremetal drivers are blocking & waiting (eg. More...
 

Variables

volatile u8_t WDTimeout = 0
 
volatile u8_t UseExternalClock = 0
 
volatile fsys_mhz SystemFrequency = DEFAULT_FSYS
 
volatile u8_t EnableCommsInterface = 0
 

Function Documentation

◆ CHILI_EnableSpiModuleClock()

__NONSECURE_ENTRY void CHILI_EnableSpiModuleClock ( void  )

Enable SPI Clock.

◆ CHILI_GetEnableCommsInterface()

__NONSECURE_ENTRY u8_t CHILI_GetEnableCommsInterface ( void  )

Get enable_comms_interface flag, used by CHILI_SystemReinit.

◆ CHILI_GetSystemFrequency()

__NONSECURE_ENTRY fsys_mhz CHILI_GetSystemFrequency ( void  )

Get current system frequency.

Returns
Current system frequency

◆ CHILI_GetUID()

__NONSECURE_ENTRY void CHILI_GetUID ( uint32_t *  uid_out)

Get the 96-bit hardware unique ID.

Parameters
uid_outOut pointer pointing to at least 3 words of memory

◆ CHILI_GetUseExternalClock()

__NONSECURE_ENTRY u8_t CHILI_GetUseExternalClock ( void  )

Get Use_external_clock flag.

◆ CHILI_SetEnableCommsInterface()

__NONSECURE_ENTRY void CHILI_SetEnableCommsInterface ( u8_t  enable_coms_interface)

Set enable_comms_interface flag, used by CHILI_SystemReinit.

◆ CHILI_SetSystemFrequency()

__NONSECURE_ENTRY void CHILI_SetSystemFrequency ( fsys_mhz  system_frequency)

Set current system frequency.

Parameters
system_frequencyNew system frequency

◆ CHILI_SetUseExternalClock()

__NONSECURE_ENTRY void CHILI_SetUseExternalClock ( u8_t  use_ext_clock)

Set Use_external_clock flag.

Variable Documentation

◆ EnableCommsInterface

volatile u8_t EnableCommsInterface = 0

◆ SystemFrequency

volatile fsys_mhz SystemFrequency = DEFAULT_FSYS

◆ UseExternalClock

volatile u8_t UseExternalClock = 0

◆ WDTimeout

volatile u8_t WDTimeout = 0