Functions
Functions
SYSTEM » Platform SDK
Collaboration diagram for Functions:

## Functions
void | platform_sdk_init (void)
| platform sdk init function. More...
void | mem_pwr_mgmt_mode_set (mem_power_t mem_pwr_mode)
| Set the memory power management mode, which can be automatic mode or full power on mode. More...
void | mem_pwr_mgmt_mode_set_from (uint32_t start_addr, uint32_t size)
| Control the memory power supply by specifying start address and length. More...
void | system_lp_table_update_twval (table_idx_t table_idx, int16_t dur_offset, int16_t ext_offset, int16_t osc_offset)
| Enable patch function. More...
void | platform_clock_init_with_rng2 (mcu_clock_type_t sys_clock, uint16_t accuracy, uint16_t xo_offset)
| Platform low power clock init function with internal RNG/RNG2 setting. More...
void | platform_clock_init_with_rtc (mcu_clock_type_t sys_clock, uint16_t accuracy, uint16_t xo_offset)
| Platform low power clock init function with External RTC setting. More...
void | platform_rc_calibration (void)
| Platform rc calibration function. More...
void | pwr_mgmt_warm_boot (void)
| Power Management warm boot. More...
void | clock_calibration_irq_handler (void)
| Handle Clock calibration interrupt request. More...
void | pwr_mgmt_update_comm_wkup_timing_param (void)
| update comm wakeup timing settings according to lf clock More...
void | platform_init (void)
| Platform init function. More...
void | system_pmu_init (mcu_clock_type_t clock_type)
| PMU init function. More...
bool | system_pmu_increase_for_peripheral (void)
| PMU increase function, will increase about 0.35v digcore. More...
bool | system_pmu_restore_for_peripheral (void)
| PMU restore function. More...
void | warm_boot_first (void)
| the first warm boot stage. More...
void | warm_boot_second (void)
| the second warm boot stage. More...
void | warm_boot (void)
| Warm boot process. More...
void | pmu_calibration_handler (void *p_arg)
| PMU calibration handler. More...
uint16_t | clock_calib_notify_register (clock_calib_notify_cb_t calib_notify_cb)
| Register the clock calibration completion callback. More...
uint16_t | clock_calib_notify_unregister (clock_calib_notify_cb_t calib_notify_cb)
| Unregister the clock calibration completion callback. More...
void | system_pmu_calibration_start (uint32_t interval)
| start calibration. More...
void | system_pmu_calibration_stop (void)
| stop calibration. More...
hal_status_t | platform_flash_enable_quad (exflash_hp_init_t *hp_init)
| write flash QE More...

## Detailed Description

## Function Documentation

## ◆ clock_calib_notify_register()

uint16_t clock_calib_notify_register | ( | clock_calib_notify_cb_t | calib_notify_cb | ) |

Register the clock calibration completion callback.

Parameters

  [in] | calib_notify_cb | : Calibration completion callback.

Return values

  SDK_SUCCESS | Register callback Successfully.
  SDK_ERR_POINTER_NULL | calib_notify_cb is null pointer.
  SDK_ERR_LIST_FULL | Operation is failed, the clock calibration completion callback is full.

## ◆ clock_calib_notify_unregister()

uint16_t clock_calib_notify_unregister | ( | clock_calib_notify_cb_t | calib_notify_cb | ) |

Unregister the clock calibration completion callback.

Parameters

  [in] | calib_notify_cb | : Calibration completion callback.

Return values

  SDK_SUCCESS | Unregister callback Successfully.
  SDK_ERR_POINTER_NULL | calib_notify_cb is null pointer.
  SDK_ERR_LIST_ITEM_NOT_FOUND | Operation is failed, the clock calibration completion has not been registered.

## ◆ clock_calibration_irq_handler()

void clock_calibration_irq_handler | ( | void |  | ) |

Handle Clock calibration interrupt request.

## ◆ mem_pwr_mgmt_mode_set()

void mem_pwr_mgmt_mode_set | ( | mem_power_t | mem_pwr_mode | ) |

Set the memory power management mode, which can be automatic mode or full power on mode.

Parameters

  [in] | mem_pwr_mode | : MEM_POWER_FULL_MODE or MEM_POWER_AUTO_MODE.

## ◆ mem_pwr_mgmt_mode_set_from()

void mem_pwr_mgmt_mode_set_from | ( | uint32_t | start_addr,
|  | uint32_t | size
| ) |  |

Control the memory power supply by specifying start address and length.

Parameters

  [in] | start_addr | : the start address of memory that user want to config
  [in] | size | : the size of memory that user want to config

## ◆ platform_clock_init_with_rng2()

void platform_clock_init_with_rng2 | ( | mcu_clock_type_t | sys_clock,
|  | uint16_t | accuracy,
|  | uint16_t | xo_offset
| ) |  |

Platform low power clock init function with internal RNG/RNG2 setting.

Parameters

  [in] | sys_clock | System clock.
  [in] | accuracy | Low speed clock accuracy.
  [in] | xo_offset | Clock calibration parameter.

## ◆ platform_clock_init_with_rtc()

void platform_clock_init_with_rtc | ( | mcu_clock_type_t | sys_clock,
|  | uint16_t | accuracy,
|  | uint16_t | xo_offset
| ) |  |

Platform low power clock init function with External RTC setting.

Parameters

  [in] | sys_clock | System clock.
  [in] | accuracy | : Low speed clock accuracy.
  [in] | xo_offset | : Clock calibration parameter.

## ◆ platform_flash_enable_quad()

hal_status_t platform_flash_enable_quad | ( | exflash_hp_init_t * | hp_init | ) |

write flash QE

Returns
  hal status

## ◆ platform_init()

void platform_init | ( | void |  | ) |

Platform init function.

## ◆ platform_rc_calibration()

void platform_rc_calibration | ( | void |  | ) |

Platform rc calibration function.

## ◆ platform_sdk_init()

void platform_sdk_init | ( | void |  | ) |

platform sdk init function.

## ◆ pmu_calibration_handler()

void pmu_calibration_handler | ( | void * | p_arg | ) |

PMU calibration handler.

Parameters

  [in] | p_arg | no args.

## ◆ pwr_mgmt_update_comm_wkup_timing_param()

void pwr_mgmt_update_comm_wkup_timing_param | ( | void |  | ) |

update comm wakeup timing settings according to lf clock

Return values

  | void

## ◆ pwr_mgmt_warm_boot()

void pwr_mgmt_warm_boot | ( | void |  | ) |

Power Management warm boot.

## ◆ system_lp_table_update_twval()

void system_lp_table_update_twval | ( | table_idx_t | table_idx,
|  | int16_t | dur_offset,
|  | int16_t | ext_offset,
|  | int16_t | osc_offset
| ) |  |

Enable patch function.

Parameters

  [in] | table_idx | : Start Index Number.
  [in] | dur_offset | : duration setting.
  [in] | ext_offset | : ext wakeup setting.
  [in] | osc_offset | : pre-wakeup setting.

## ◆ system_pmu_calibration_start()

void system_pmu_calibration_start | ( | uint32_t | interval | ) |

start calibration.

Parameters

  [in] | interval | : the interval of calibration process.

## ◆ system_pmu_calibration_stop()

void system_pmu_calibration_stop | ( | void |  | ) |

stop calibration.

## ◆ system_pmu_increase_for_peripheral()

bool system_pmu_increase_for_peripheral | ( | void |  | ) |

PMU increase function, will increase about 0.35v digcore.

## ◆ system_pmu_init()

void system_pmu_init | ( | mcu_clock_type_t | clock_type | ) |

PMU init function.

Parameters

  [in] | clock_type | : clock type to be configured.

## ◆ system_pmu_restore_for_peripheral()

bool system_pmu_restore_for_peripheral | ( | void |  | ) |

PMU restore function.

When wanting to use higher digcore voltage, call system_pmu_increase_for_peripheral(), when no need use higher voltage anymore, call system_pmu_restore_for_peripheral().

## ◆ warm_boot()

void warm_boot | ( | void |  | ) |

Warm boot process.

## ◆ warm_boot_first()

void warm_boot_first | ( | void |  | ) |

the first warm boot stage.

## ◆ warm_boot_second()

void warm_boot_second | ( | void |  | ) |

the second warm boot stage.