Go to the documentation of this file.
51 #ifndef __GR533X_SYS_SDK_H__
52 #define __GR533X_SYS_SDK_H__
57 #include "gr5xx_fpb.h"
67 #define SYS_BOOT_SETTING_PATTERN 0x474F4F44
68 #define SYS_BOOT_SETTING_RSV_MAGIC 0xFFFFFFFF
69 #define SYS_BOOT_SETTING_SWD_ENABLE 0xFF
70 #define SYS_BOOT_SETTING_SWD_DISABLE 0xA5
71 #define SYS_SCA_SETTING_ADDR 0x0027F000
72 #define SYS_INVALID_TIMER_ID 0xFF
73 #define SYS_BD_ADDR_LEN BLE_GAP_ADDR_LEN
74 #define SYS_CHIP_UID_LEN 0x10
75 #define SYS_SET_BD_ADDR(BD_ADDR_ARRAY) nvds_put(0xC001, SYS_BD_ADDR_LEN, BD_ADDR_ARRAY)
76 #define SYS_ROM_VERSION_ADDR ((uint32_t)(0x200))
220 uint32_t fw_check_sum;
226 uint8_t comments[20];
227 uint8_t reserved[15];
228 uint32_t setting_check_sum;
void sys_security_data_use_present(uint32_t addr, uint8_t *input, uint32_t size, uint8_t *output)
Encrypt and decrypt data using Present.
uint16_t sys_device_lp_gain_offset_2m_get(uint8_t *p_offset)
Get the LP gain offset 2M information.
GR533X Platform Power Manager Module API.
uint8_t sys_sdk_ultra_conn_update(uint8_t conn_idx, uint16_t interval, uint16_t latency, uint16_t superv_to)
Register the callback function of the extended llcp process.
uint16_t sys_device_addr_get(uint8_t *p_device_addr)
Get the device address information.
void restore_sys_context(void)
Load system context.
void sys_app_printf(const char *format,...)
Output debug logs.
uint16_t sys_device_package_get(package_type_t *p_package_type)
Get the chip's package type.
RF trim parameter information definition.
uint16_t sys_hw_version_get(hw_version_type_t *p_hw_version)
Get the HW version information.
hw_version_type_t
package type.
Define the chip configuration.
uint16_t sys_ble_heartbeat_period_set(uint32_t period_hus)
Set BLE Sleep HeartBeat Period.
uint16_t sys_pmu_trim_get(pmu_trim_info_t *p_pmu_trim)
Get the PMU trim information.
uint8_t sys_nonret_usage_ratio_get(void)
Get system non retention heap usage ratio.
struct __attribute((packed))
void(* assert_err_cb_t)(const char *expr, const char *file, int line)
Error assert callback type.
void(* timer_callback_t)(uint8_t timer_id)
Timer callback type.
uint16_t sys_trim_sum_get(uint16_t *p_trim_sum)
Get the trim checksum.
uint32_t sys_lpper_get(void)
Get low power CLK period.
uint16_t sys_device_uid_get(uint8_t *p_device_uid)
Get the device UID information.
package_type_t
package type.
uint16_t(* raw_log_send_cb_t)(uint8_t *p_data, uint16_t length)
raw log callback type.
Warm boot timing parameters(unit: us).
uint8_t sys_msg_usage_ratio_get(void)
Get system message heap usage ratio.
assert_warn_cb_t assert_warn_cb
uint8_t sys_env_usage_ratio_get(void)
Get system environment heap usage ratio.
uint16_t sys_rf_trim_get(rf_trim_info_t *p_rf_trim)
Get the RF trim information.
PMU trim parameter information definition.
uint16_t sys_device_sram_get(sram_size_t *p_sram_size)
Get the RAM size information.
void(* assert_param_cb_t)(int param0, int param1, const char *file, int line)
Parameter assert callback type.
void sys_signal_handler_register(callback_t isr_handler)
Register signal handler.
void sys_swd_disable(void)
Diable swd function.
void set_io_ldo_use_3p3_v(bool flag)
Set g_io_ldo_use_3p3_v function.
uint16_t sys_adc_trim_get(adc_trim_info_t *p_adc_trim)
Get the ADC trim information.
void delay_us(uint32_t us)
Delay the function execution.
void sys_firmware_jump(uint32_t fw_addr, uint32_t fw_bin_size)
jump to app firmware.
void(* sys_context_func_t)(void)
Function type for saving user context before deep sleep.
void sys_sdk_verison_get(sdk_version_t *p_version)
Get SDK version.
sram_size_t
Definition of Device SRAM Size Enumerations.
void sys_free(void *mem_ptr)
free memery.
uint8_t dig_ldo_1p05_coarse
uint32_t sys_us_2_lpcycles(uint32_t us)
Convert a duration in μs into a duration in lp cycles.
void sys_swd_enable(void)
Enable swd function.
void sys_context_save(void)
Save system context.
void delay_ms(uint32_t ms)
Delay the function execution.
void sys_lpclk_set(uint32_t user_lpclk)
Set low power CLK frequency.
int32_t(* int_func_t)(void)
Low power clock update function type.
uint32_t sys_lpclk_get(void)
Get low power CLK frequency.
uint8_t dig_ldo_1p05_fine
int(* vprintf_callback_t)(const char *fmt, va_list argp)
Printf callback type.
void sys_assert_cb_register(sys_assert_cb_t *p_assert_cb)
Register assert callbacks.
uint32_t sys_lpcycles_2_hus(uint32_t lpcycles, uint32_t *error_corr)
Convert a duration in lp cycles into a duration in half μs.
bool sys_ke_sleep_check(void)
Get status of ke_event list.
assert_param_cb_t assert_param_cb
void(* void_func_t)(void)
Low power clock update function type.
void(* assert_warn_cb_t)(int param0, int param1, const char *file, int line)
Warning assert callback type.
ADC trim parameter information definition.
void ble_em_addr_offset_set(uint16_t offset)
Set ble exchange memory buffer address common offset.
void ble_stack_em_base_init(uint32_t address)
Set ble exchange memory base address.
void sys_max_msg_usage_ratio_set(uint8_t usage_ratio)
Set system maximum usage ratio of message heap.
uint8_t dig_ldo_0p9_coarse
void sys_lld_max_msg_usage_ratio_set(uint8_t usage_ratio)
Set system lld layer maximum usage ratio of message heap.
void * sys_malloc(uint32_t size)
Malloc size memery.
void(* callback_t)(int)
The function pointers to register event callback.
uint16_t sys_crystal_trim_get(uint16_t *p_crystal_trim)
Get the crystal trim information.
uint8_t sys_attdb_usage_ratio_get(void)
Get system attriute database heap usage ratio.
assert_err_cb_t assert_err_cb
uint16_t sys_ble_heartbeat_period_get(uint32_t *p_period_hus)
Get BLE Sleep HeartBeat Period.