RA Flexible Software Package Documentation  Release v5.7.0

 
Timer, 32-bit Interval Timer (r_tml)

Functions

fsp_err_t R_TML_Open (timer_ctrl_t *const p_ctrl, timer_cfg_t const *const p_cfg)
 
fsp_err_t R_TML_Stop (timer_ctrl_t *const p_ctrl)
 
fsp_err_t R_TML_Start (timer_ctrl_t *const p_ctrl)
 
fsp_err_t R_TML_Reset (timer_ctrl_t *const p_ctrl)
 
fsp_err_t R_TML_Enable (timer_ctrl_t *const p_ctrl)
 
fsp_err_t R_TML_Disable (timer_ctrl_t *const p_ctrl)
 
fsp_err_t R_TML_PeriodSet (timer_ctrl_t *const p_ctrl, uint32_t const period_counts)
 
fsp_err_t R_TML_DutyCycleSet (timer_ctrl_t *const p_ctrl, uint32_t const duty_cycle_counts, uint32_t const pin)
 
fsp_err_t R_TML_CompareMatchSet (timer_ctrl_t *const p_ctrl, uint32_t const compare_match_value, timer_compare_match_t const match_channel)
 
fsp_err_t R_TML_InfoGet (timer_ctrl_t *const p_ctrl, timer_info_t *const p_info)
 
fsp_err_t R_TML_StatusGet (timer_ctrl_t *const p_ctrl, timer_status_t *const p_status)
 
fsp_err_t R_TML_CallbackSet (timer_ctrl_t *const p_api_ctrl, void(*p_callback)(timer_callback_args_t *), void const *const p_context, timer_callback_args_t *const p_callback_memory)
 
fsp_err_t R_TML_Close (timer_ctrl_t *const p_ctrl)
 

Detailed Description

Driver for the TML peripherals on RA MCUs. This module implements the Timer Interface.

Overview

The TML module can be used to count or count input events. TML operates with the HOCO, MOCO, MOSC, LOCO/SOSC clock or the event input from the ELC, which is asynchronous to CPU operation.

Features

The TML module has the following features:

Selecting a Timer

RA MCUs have different timer peripherals: the General PWM Timer (GPT), the 32-bit Interval Timer (TML), Timer Array Unit (TAU), and the Asynchronous General Purpose Timer (AGT). Some MCUs have multiple timer modules. When selecting between them, consider these factors:

GPT TML AGT TAU
Low Power ModesThe GPT can operate in sleep mode.The TML can operate in all low power modes.The AGT can operate in all low power modes.The TAU can not operate in all low power modes.
Available ChannelsThe number of GPT channels is device specific. Currently supported MCUs have at least 7 GPT channels.Currently supported MCUs have 4 TML channels.Currently supported MCUs have 2 AGT channels.Currently supported MCUs have 8 TAU channels.
Timer ResolutionCurrently supported MCUs have at least one 32-bit GPT timer.The TML timers are 32-bit/16-bit/8-bit timers.The AGT timers are 16-bit timers.The TAU timers are 16-bit/8-bit timers.
Clock SourceThe GPT runs off PCLKD with a configurable divider up to 1024. It can also be configured to count ELC events or external pulses.The TML runs off MOSC, LOCO/SOSC, HOCO, MOCO with a configurable divider up to 128 or ELC events.The AGT runs off PCLKB, LOCO, or subclock.The TAU runs off PCLK with a configurable divider up to 32768

Configuration

Build Time Configurations for r_tml

The following build time configurations are defined in fsp_cfg/r_tml_cfg.h:

ConfigurationOptionsDefaultDescription
Parameter Checking
  • Default (BSP)
  • Enabled
  • Disabled
Default (BSP) If selected code for parameter checking is included in the build.
Critical Section Guarding
  • Enabled
  • Disabled
Disabled Enable critical section guarding around peripheral configuration updates. This should be enabled if multiple instances of the R_TML module are being used.
16-bit Capture Mode Support
  • Disabled
  • Enabled
Disabled Controls whether 16-bit capture mode support is included in the build. This setting applies globally to all r_tml_instances. If 16-bit capture mode is not used by any instance, disable this setting to reduce ROM usage.
Enable Single Channel
  • Disabled
  • Enabled
Disabled Enable single channel to reduce code size. Assumes channel 0.
Interrupt Support
  • Disabled
  • Enabled
Disabled Enable support for interrupts.

Configurations for Timers > 32-bit Interval Timer (r_tml)

This module can be added to the Stacks tab via New Stack > Timers > 32-bit Interval Timer (r_tml).

ConfigurationOptionsDefaultDescription
General
NameName must be a valid C symbolg_timer0 Module name.
Mode
  • 8-bit Counter Mode
  • 16-bit Counter Mode
  • 32-bit Counter Mode
  • 16-bit Capture Mode
16-bit Counter Mode Selection of Operating mode.
Channel SelectionChannel number must exist on this MCU0 Specify the hardware channel.
ELC eventMCU Specific OptionsSelect the elc event.
Counter Mode Settings
PeriodValue must be positive integer0x10000 Specify the timer period in units selected below.

Set the period to 0x100 (8-bit) or 0x10000 (16-bit) or 0x100000000 (32-bit) raw counts for a free running timer. Since the maxmimum divider is 128... the raw counts period can be set up to the (max count+1)*128. [0x8000 (8-bit) or 0x800000 (16-bit), or 0x8000000000 (32-bit)].
Period Unit
  • Raw Counts
  • Nanoseconds
  • Microseconds
  • Milliseconds
  • Seconds
  • Hertz
  • Kilohertz
Raw Counts Unit of the period specified above. When the Counter Clock Source is the ELC, only Raw Counts can be selected here.
Capture Mode Settings
Capture Mode Settings > 16-Bit Counter Input Settings (when Capture source = Interrupt on compare match with ITLCMP01)
PeriodValue must be positive integer0x10000 Specify the timer period in units selected below.

Set the period to 0x10000 raw counts in the maximum period of 16-bit capture.
Period Unit
  • Raw Counts
  • Nanoseconds
  • Microseconds
  • Milliseconds
  • Seconds
  • Hertz
  • Kilohertz
Raw Counts Unit of the period specified above. When the Capture Clock Source is the ELC, only Raw Counts can be selected here.
Capture TriggerMCU Specific OptionsSelection of capture trigger.
Capture Clock Divider
  • fITL0
  • fITL0/2
  • fITL0/4
  • fITL0/8
  • fITL0/16
  • fITL0/32
  • fITL0/64
  • fITL0/128
fITL0 Configure FDIV0 for the counter clock in 16-bit Capture Mode.
Counter Status
  • Retained after the completion of capturing
  • Cleared after the completion of capturing
Retained after the completion of capturing Selection of the 16-bit counter (ITL000 + ITL001) clearing after capturing.
Interrupt
Callback functionName must be a valid C symbolNULL A user callback function can be provided here. If this callback function is provided, it is called from the interrupt service routine (ISR) each time the IRQn triggers
PriorityMCU Specific OptionsSelect the interrupt priority.

Clock Configuration

The TML operating clock is based on the HOCO, MOCO, MOSC, or LOCO/SOSC. The operating frequency will be based on the source chosen and the divider selected. You can set the clock frequencies using the Clocks tab of the RA Configuration editor or change the clock divider for the capture mode channel by Capture Mode Settings->Capture Clock Divider.

Note
The TML channels may be alternatively configured to use an event input from the ELC as a count clock in case no frequency/duration can be input, only "Raw Counts".

Pin Configuration

Usage Notes

Maximum Period

In capture mode, the clock divider for the capture channel has to be selected in Capture Mode Settings->Capture Clock Divider. If ITLCMP01 is the capture trigger input, the clock divider for channels 2 + 3 is not available.

When no capture mode is active, the RA Configuration editor will automatically calculate the period count value and source clock divider based on the selected period time, units and clock speed.

When the selected period unit is "Raw counts", the maximum period setting is 0x8000000000/0x800000/0x8000 on a 32-bit/16-bit/8-bit timer. This will configure the timer with the maximum period and a count clock divisor of 128.

Note
When an event input from ELC is used as an operation clock, the automatic calculation of the period count value and source clock divider is not available.

Updating Period

The period is updated after calling R_TML_PeriodSet().

Note
The period is only updated when the counter is stopped.
When using the API to set the period counts, the maximum timer_cfg_t::period_counts for 8-bit and 16-bit modes are 0x100 and 0x10000, respectively. To set the the maximum count for 32-bit mode, set the timer_cfg_t::period_counts to 0 (as 0x10000000 is outside the 32-bit range).
In the 16-bit capture mode, if the interrupt on compare match with ITLCMP01 is used as trigger source, the period counts of the 16-bit timer channels 2 + 3 can be changed at run-time.

Capture mode

When the 16-bit capture mode is to be used for channels 0 and 1, the counter value is stored in interval timer capture register 00 (ITLCAP00) in response to the selected capture trigger.

Note
When Channels 0 and 1 are in capture mode, Channels 2 and 3 can be used to trigger the capture when ITLCMP01 is the capture trigger. In this case the counter setup for Channels 2 and 3 are in Capture Mode Settings->16-Bit Counter Input Settings. If ITLCMP01 is not the capture trigger input, Channels 2 and 3 may be setup as an independent instance of 16-bit Counter channel.
When a capture trigger is generated when the timer is not running, the previous counter value of the capture channel is still copied to the Interval Timer Capture Register (ITLCAP00).
The Common->16-bit Capture Mode Support property in the module configuration must be enabled to use the capture operation.

Controlling TML with ELC Events

The TML timer can be configured to start count down or trigger capture when an ELC event occurs.

Note
The configurable ELC TML sources are shared by all TML channels.
The event links for the ELC must be configured outside this module.

Triggering ELC Events with TML

The TML timer can trigger the start of other peripherals. The Event Link Controller (r_elc) guide provides a list of all available peripherals.

Examples

TML Basic Example

This is a basic example of minimal use of the TML in an application.

void tml_basic_example (void)
{
fsp_err_t err = FSP_SUCCESS;
/* Initializes the module. */
err = R_TML_Open(&g_timer0_ctrl, &g_timer0_cfg);
/* Handle any errors. This function should be defined by the user. */
assert(FSP_SUCCESS == err);
/* Start the timer. */
(void) R_TML_Start(&g_timer0_ctrl);
}

TML Callback Example

This is an example of a timer callback.

/* Example callback called when timer expires. */
void timer_callback (timer_callback_args_t * p_args)
{
if (TIMER_EVENT_CYCLE_END == p_args->event)
{
/* Add application code to be called periodically here. */
}
}

TML Counter Example

This is an example of 8/16/32-bit Counter.

void tml_counter_example (void)
{
fsp_err_t err = FSP_SUCCESS;
/* Initializes the module. */
err = R_TML_Open(&g_timer0_ctrl, &g_timer0_cfg);
/* Handle any errors. This function should be defined by the user. */
assert(FSP_SUCCESS == err);
/* Start the timer. */
(void) R_TML_Start(&g_timer0_ctrl);
/* Read the current state. Counter value is in status.state. */
(void) R_TML_StatusGet(&g_timer0_ctrl, &status);
/* (Optional) Enable the mask for the interrupt flag. */
(void) R_TML_Disable(&g_timer0_ctrl);
/* (Optional) Disable the mask to use the interrupt. */
(void) R_TML_Enable(&g_timer0_ctrl);
/* (Optional) Stop the timer. */
(void) R_TML_Stop(&g_timer0_ctrl);
}

TML Capture Example

This is an example of using the TML to capture the counter value of configured channel.

/* Example callback called when a capture occurs. */
uint64_t g_captured_time = 0U;
uint32_t g_capture_overflows = 0U;
void timer_capture_callback (timer_callback_args_t * p_args)
{
{
/* (Optional) Get the current period if not known. */
(void) R_TML_InfoGet(&g_timer0_ctrl, &info);
uint32_t period = info.period_counts;
g_captured_time = (period * g_capture_overflows) + p_args->capture;
g_capture_overflows = 0U;
}
if (TIMER_EVENT_CYCLE_END == p_args->event)
{
/* An overflow occurred during capture. This must be accounted for at the application layer. */
g_capture_overflows++;
}
}
void tml_capture_example (void)
{
fsp_err_t err = FSP_SUCCESS;
/* Initializes the module. */
err = R_TML_Open(&g_timer0_ctrl, &g_timer0_cfg);
/* Handle any errors. This function should be defined by the user. */
assert(FSP_SUCCESS == err);
/* There are 4 ways to trigger the capture:
* - Use software trigger by set the ITLCC0.CAPR bit to 1 directly after call start
* - Use ELC event and wait for valid input
* - Use LOCO/SOSC clock and wait for valid edge
* - Use interrupt on compare match with ITLCPM01
*
* This example uses the last option.
*/
(void) R_TML_Start(&g_timer0_ctrl);
}

TML Period Update Example

This an example of updating the period.

#define TML_EXAMPLE_MSEC_PER_SEC (1000)
#define TML_EXAMPLE_DESIRED_PERIOD_MSEC (20)
/* This example shows how to calculate a new period value at runtime. */
void tml_period_calculation_example (void)
{
fsp_err_t err = FSP_SUCCESS;
/* Initializes the module. */
err = R_TML_Open(&g_timer0_ctrl, &g_timer0_cfg);
/* Handle any errors. This function should be defined by the user. */
assert(FSP_SUCCESS == err);
/* Get the source clock frequency (in Hz) */
(void) R_TML_InfoGet(&g_timer0_ctrl, &info);
uint32_t timer_freq_hz = info.clock_frequency;
/* Calculate the desired period based on the current clock. Note that this calculation could overflow if the
* desired period is larger than UINT32_MAX. A cast to uint64_t is used to prevent this. */
uint32_t period_counts =
(uint32_t) (((uint64_t) timer_freq_hz * TML_EXAMPLE_DESIRED_PERIOD_MSEC) / TML_EXAMPLE_MSEC_PER_SEC);
/* Set the calculated period. */
err = R_TML_PeriodSet(&g_timer0_ctrl, period_counts);
assert(FSP_SUCCESS == err);
/* Start the timer. */
(void) R_TML_Start(&g_timer0_ctrl);
}

Data Structures

struct  tml_extended_cfg_t
 
struct  tml_instance_ctrl_t
 

Enumerations

enum  tml_clock_t
 
enum  tml_capture_trigger_t
 
enum  tml_counter_status_t
 

Data Structure Documentation

◆ tml_extended_cfg_t

struct tml_extended_cfg_t

User configuration structure, used in open function

Data Fields
tml_capture_trigger_t capture_trigger Select the capture source for capture channel.
tml_counter_status_t counter_status Status of 16-bit counter (ITL000 + ITL001) after completion of capturing.

◆ tml_instance_ctrl_t

struct tml_instance_ctrl_t

TML instance control block.

Data Fields

uint32_t open
 Used to determine if the channel is configured.
 
const timer_cfg_tp_cfg
 Pointer to the configuration block.
 
uint8_t channel_mask
 Mask value of channel used.
 
void(* p_callback )(timer_callback_args_t *)
 Pointer to callback that is called when a timer event occurs.
 
void const * p_context
 Pointer to context to be passed into callback function.
 

Enumeration Type Documentation

◆ tml_clock_t

Enumeration for TML FITL0, FITL1 clock source

Enumerator
TML_CLOCK_HOCO 

HOCO.

TML_CLOCK_MOCO 

MOCO.

TML_CLOCK_MOSC 

MOSC.

TML_CLOCK_LOCO_SOSC 

SOSC.

TML_CLOCK_ELC_EVENT 

Event input from the ELC.

◆ tml_capture_trigger_t

Enumeration for TML FITL2 capture trigger source

Enumerator
TML_CAPTURE_TRIGGER_SOFTWARE 

Software trigger.

TML_CAPTURE_TRIGGER_ITLCMP01 

Interrupt on compare match with ITLCMP01.

TML_CAPTURE_TRIGGER_LOCO_SOSC 

LOCO/SOSC (rising edge)

TML_CAPTURE_TRIGGER_EVENT_ELC 

Event input from ELC (rising edge)

◆ tml_counter_status_t

Enumeration for status of 16-bit counter (ITL000 + ITL001) after completion of capturing

Enumerator
TML_COUNTER_STATUS_RETAINED_AFTER_CAPTURING 

16-bit counter (ITL000 + ITL001) is retained after the completion of capturing

TML_COUNTER_STATUS_CLEARED_AFTER_CAPTURING 

16-bit counter (ITL000 + ITL001) is cleared after the completion of capturing

Function Documentation

◆ R_TML_Open()

fsp_err_t R_TML_Open ( timer_ctrl_t *const  p_ctrl,
timer_cfg_t const *const  p_cfg 
)

Initializes the timer module and applies configurations. Implements timer_api_t::open.

TML hardware does not support one-shot functionality natively. If one shot mode is desired, the user code should stop the timer after the timer expires the first time in an ISR after the requested period has elapsed.

The TML implementation of the general timer can accept a tml_extended_cfg_t extension parameter.

Example:

/* Initializes the module. */
err = R_TML_Open(&g_timer0_ctrl, &g_timer0_cfg);
Return values
FSP_SUCCESSInitialization was successful and timer has started.
FSP_ERR_ASSERTIONA required input pointer is NULL or the source divider is invalid.
FSP_ERR_ALREADY_OPENModule is already open.
FSP_ERR_IRQ_BSP_DISABLEDtimer_cfg_t::p_callback is not NULL, but ISR is not enabled. ISR must be enabled to use one-shot mode or callback.
FSP_ERR_IP_CHANNEL_NOT_PRESENTThe channel requested in the p_cfg parameter is not available on this device.
FSP_ERR_INVALID_CHANNELSelected channel is invalid
FSP_ERR_INVALID_MODEThe mode requested in the p_cfg parameter is incorrect. It must be the same for all instances.
FSP_ERR_IN_USEChannel is running

◆ R_TML_Stop()

fsp_err_t R_TML_Stop ( timer_ctrl_t *const  p_ctrl)

Stops the counter and disable the capture. Implements timer_api_t::stop.

Example:

/* (Optional) Stop the timer. */
(void) R_TML_Stop(&g_timer0_ctrl);
Return values
FSP_SUCCESSTimer successfully stopped.
FSP_ERR_ASSERTIONp_ctrl was NULL.
FSP_ERR_NOT_OPENThe instance is not opened.
FSP_ERR_IP_CHANNEL_NOT_PRESENTThe channel requested in the p_cfg parameter is not available on this device.

◆ R_TML_Start()

fsp_err_t R_TML_Start ( timer_ctrl_t *const  p_ctrl)

Starts the counter and enable the capture. Implements timer_api_t::start.

Example:

/* Start the timer. */
(void) R_TML_Start(&g_timer0_ctrl);
Return values
FSP_SUCCESSTimer successfully started.
FSP_ERR_ASSERTIONp_ctrl was NULL.
FSP_ERR_NOT_OPENThe instance is not opened.
FSP_ERR_IP_CHANNEL_NOT_PRESENTThe channel requested in the p_cfg parameter is not available on this device.

◆ R_TML_Reset()

fsp_err_t R_TML_Reset ( timer_ctrl_t *const  p_ctrl)

Resets the counter value to 0. Implements timer_api_t::reset.

Return values
FSP_SUCCESSCounter value written successfully.
FSP_ERR_ASSERTIONp_ctrl was NULL.
FSP_ERR_NOT_OPENThe instance is not opened.
FSP_ERR_IP_CHANNEL_NOT_PRESENTThe channel requested in the p_cfg parameter is not available on this device.

◆ R_TML_Enable()

fsp_err_t R_TML_Enable ( timer_ctrl_t *const  p_ctrl)

Enable the interrupt generation from the selected channel timer_api_t::enable.

Example:

/* (Optional) Disable the mask to use the interrupt. */
(void) R_TML_Enable(&g_timer0_ctrl);
Return values
FSP_SUCCESSExternal events successfully enabled.
FSP_ERR_ASSERTIONp_ctrl was NULL.
FSP_ERR_NOT_OPENThe instance is not opened.
FSP_ERR_IP_CHANNEL_NOT_PRESENTThe channel requested in the p_cfg parameter is not available on this device.

◆ R_TML_Disable()

fsp_err_t R_TML_Disable ( timer_ctrl_t *const  p_ctrl)

Disable the interrupt generation for this timer. Implements timer_api_t::disable.

Note
The timer could be stop after R_TML_Disable().

Example:

/* (Optional) Enable the mask for the interrupt flag. */
(void) R_TML_Disable(&g_timer0_ctrl);
Return values
FSP_SUCCESSExternal events successfully disabled.
FSP_ERR_ASSERTIONp_ctrl was NULL.
FSP_ERR_NOT_OPENThe instance is not opened.
FSP_ERR_IP_CHANNEL_NOT_PRESENTThe channel requested in the p_cfg parameter is not available on this device.

◆ R_TML_PeriodSet()

fsp_err_t R_TML_PeriodSet ( timer_ctrl_t *const  p_ctrl,
uint32_t const  period_counts 
)

Sets period value provided. Only set this value when all timers are stop. Implements timer_api_t::periodSet.

Example:

/* Get the source clock frequency (in Hz) */
(void) R_TML_InfoGet(&g_timer0_ctrl, &info);
uint32_t timer_freq_hz = info.clock_frequency;
/* Calculate the desired period based on the current clock. Note that this calculation could overflow if the
* desired period is larger than UINT32_MAX. A cast to uint64_t is used to prevent this. */
uint32_t period_counts =
(uint32_t) (((uint64_t) timer_freq_hz * TML_EXAMPLE_DESIRED_PERIOD_MSEC) / TML_EXAMPLE_MSEC_PER_SEC);
/* Set the calculated period. */
err = R_TML_PeriodSet(&g_timer0_ctrl, period_counts);
assert(FSP_SUCCESS == err);
Return values
FSP_SUCCESSPeriod value written successfully.
FSP_ERR_ASSERTIONp_ctrl was NULL.
FSP_ERR_NOT_OPENThe instance is not opened.
FSP_ERR_IN_USEChannel is running

◆ R_TML_DutyCycleSet()

fsp_err_t R_TML_DutyCycleSet ( timer_ctrl_t *const  p_ctrl,
uint32_t const  duty_cycle_counts,
uint32_t const  pin 
)

timer_api_t::dutyCycleSet is not supported on the TML.

Return values
FSP_ERR_UNSUPPORTEDFunction not supported in this implementation.

◆ R_TML_CompareMatchSet()

fsp_err_t R_TML_CompareMatchSet ( timer_ctrl_t *const  p_ctrl,
uint32_t const  compare_match_value,
timer_compare_match_t const  match_channel 
)

timer_api_t::compareMatchSet is not supported on the TML.

Return values
FSP_ERR_UNSUPPORTEDFunction not supported in this implementation.

◆ R_TML_InfoGet()

fsp_err_t R_TML_InfoGet ( timer_ctrl_t *const  p_ctrl,
timer_info_t *const  p_info 
)

Get timer configuration information and store it in provided pointer p_info. Implements timer_api_t::infoGet.

Example:

/* (Optional) Get the current period if not known. */
(void) R_TML_InfoGet(&g_timer0_ctrl, &info);
uint32_t period = info.period_counts;
Return values
FSP_SUCCESSPeriod, count direction, frequency, and ELC event written to caller's structure successfully.
FSP_ERR_ASSERTIONp_ctrl or p_info was NULL.
FSP_ERR_NOT_OPENThe instance is not opened.

◆ R_TML_StatusGet()

fsp_err_t R_TML_StatusGet ( timer_ctrl_t *const  p_ctrl,
timer_status_t *const  p_status 
)

Get current timer status and store it in provided pointer p_status. Implements timer_api_t::statusGet.

Example:

/* Read the current state. Counter value is in status.state. */
(void) R_TML_StatusGet(&g_timer0_ctrl, &status);
Return values
FSP_SUCCESSCurrent timer state and counter value set successfully.
FSP_ERR_ASSERTIONp_ctrl or p_status was NULL.
FSP_ERR_NOT_OPENThe instance is not opened.
FSP_ERR_IP_CHANNEL_NOT_PRESENTThe channel requested in the p_cfg parameter is not available on this device.

◆ R_TML_CallbackSet()

fsp_err_t R_TML_CallbackSet ( timer_ctrl_t *const  p_api_ctrl,
void(*)(timer_callback_args_t *)  p_callback,
void const *const  p_context,
timer_callback_args_t *const  p_callback_memory 
)

Updates the user callback with the option to provide memory for the callback argument structure. Implements timer_api_t::callbackSet.

Return values
FSP_SUCCESSCallback updated successfully.
FSP_ERR_ASSERTIONA required pointer is NULL.
FSP_ERR_NOT_OPENThe control block has not been opened.

◆ R_TML_Close()

fsp_err_t R_TML_Close ( timer_ctrl_t *const  p_ctrl)

Stops counter, disables output pins, and clears internal driver data. Implements timer_api_t::close.

Return values
FSP_SUCCESSSuccessful close.
FSP_ERR_ASSERTIONp_ctrl was NULL.
FSP_ERR_NOT_OPENThe instance is not opened.
FSP_ERR_IP_CHANNEL_NOT_PRESENTThe channel requested in the p_cfg parameter is not available on this device.
FSP_ERR_IN_USEChannel is running