ERRLOG

group npmx_errlog

Error Log (ERRLOG) peripheral driver.

Enums

enum npmx_errlog_scratch_t

Available scratch registers.

Values:

enumerator NPMX_ERRLOG_SCRATCH0

Scratch 0 register.

enumerator NPMX_ERRLOG_SCRATCH1

Scratch 1 register.

enumerator NPMX_ERRLOG_SCRATCH_COUNT

Scratch registers count.

enumerator NPMX_ERRLOG_SCRATCH_INVALID

Invalid scratch register.

enum npmx_errlog_task_t

Error log tasks.

Values:

enumerator NPMX_ERRLOG_TASK_CLEAR

Clear all error log registers.

enumerator NPMX_ERRLOG_TASK_COUNT

Error log tasks count.

Functions

npmx_errlog_t *npmx_errlog_get(npmx_instance_t *p_pmic, uint8_t idx)

Function for returning error log instance based on index.

Parameters:
  • p_pmic[in] Pointer to the PMIC instance.

  • idx[in] Index of the error log instance.

Returns:

Pointer to the error log instance.

npmx_error_t npmx_errlog_task_trigger(npmx_errlog_t const *p_instance, npmx_errlog_task_t task)

Function for activating the specified error log task.

Parameters:
  • p_instance[in] Pointer to the instance of error log.

  • task[in] Task to be activated.

Return values:
  • NPMX_SUCCESS – Operation performed successfully.

  • NPMX_ERROR_IO – Error using IO bus line.

npmx_error_t npmx_errlog_reset_errors_check(npmx_errlog_t const *p_instance)

Function for checking reset errors and running registered callbacks.

Parameters:
  • p_instance[in] Pointer to the instance of error log.

Return values:
  • NPMX_SUCCESS – Operation performed successfully.

  • NPMX_ERROR_IO – Error using IO bus line.

npmx_error_t npmx_errlog_scratch_set(npmx_errlog_t const *p_instance, npmx_errlog_scratch_t scratch, uint8_t value)

Function for setting scratch value for specified scratch register.

Note

This function must not be used after calling npmx_core_init function with the restore_values parameter selected as true.

Parameters:
  • p_instance[in] Pointer to the instance of error log.

  • scratch[in] Selected scratch register.

  • value[in] Scratch register value to be saved.

Return values:
  • NPMX_SUCCESS – Operation performed successfully.

  • NPMX_ERROR_IO – Error using IO bus line.

npmx_error_t npmx_errlog_scratch_get(npmx_errlog_t const *p_instance, npmx_errlog_scratch_t scratch, uint8_t *p_value)

Function for reading scratch value for specified scratch register.

Parameters:
  • p_instance[in] Pointer to the instance of error log.

  • scratch[in] Selected scratch register.

  • p_value[out] Pointer to value OF variable.

Return values:
  • NPMX_SUCCESS – Operation performed successfully.

  • NPMX_ERROR_IO – Error using IO bus line.

npmx_error_t npmx_errlog_boot_timer_enable_set(npmx_errlog_t const *p_instance, bool enable)

Function for enabling or disabling boot monitor timer.

Parameters:
  • p_instance[in] Pointer to the instance of error log.

  • enable[in] True if boot monitor is to be enabled, false otherwise.

Return values:
  • NPMX_SUCCESS – Operation performed successfully.

  • NPMX_ERROR_IO – Error using IO bus line.

npmx_error_t npmx_errlog_boot_timer_enable_get(npmx_errlog_t const *p_instance, bool *p_enable)

Function checking whether boot monitor timer is enabled.

Parameters:
  • p_instance[in] Pointer to the instance of error log.

  • p_enable[out] Pointer to the boot monitor timer variable. True if timer is enabled, false otherwise.

Return values:
  • NPMX_SUCCESS – Operation performed successfully.

  • NPMX_ERROR_IO – Error using IO bus line.

struct npmx_errlog_t
#include <npmx_errlog.h>

Data structure of the error log driver instance.

Public Members

npmx_instance_t *p_pmic

Pointer to the PMIC instance.