![]() |
HT32SX Monarch Scan
Monarch Scan application for HT32SX
|
: This file provides code for the configuration of the TIM instances. More...
#include "tim.h"Macros | |
| #define | ABS(x) (x>0?x:-x) |
| Absolute value macro. More... | |
| #define | DECAY_LEVEL 34 |
Functions | |
| void | MX_TIM6_Init (void) |
| void | HAL_TIM_Base_MspInit (TIM_HandleTypeDef *tim_baseHandle) |
| void | HAL_TIM_Base_MspDeInit (TIM_HandleTypeDef *tim_baseHandle) |
| void | SdkEvalTimersFindFactors (uint32_t lCycles, uint16_t *pnPrescaler, uint16_t *pnCounter) |
| Computes two integer value prescaler and period such that Cycles = prescaler * period. More... | |
| void | SdkEvalTimersTimConfig (TIM_HandleTypeDef *TIM_TimeBaseStructure, uint16_t nPrescaler, uint16_t nPeriod) |
| Configures the specified timer to raise an interrupt every time the counter reaches the nPeriod value counting with a prescaler of nPrescaler. More... | |
| void | ST_MCU_API_TimerCalibration (uint16_t duration_ms) |
| sfx_u8 | MCU_API_timer_start_carrier_sense (sfx_u16 time_duration_in_ms) |
| Start timer for : More... | |
| sfx_u8 | MCU_API_timer_start (sfx_u32 time_duration_in_s) |
| Start timer for in second duration. More... | |
| sfx_u8 | MCU_API_timer_stop (void) |
| Stop the timer (started with MCU_API_timer_start) More... | |
| sfx_u8 | MCU_API_timer_stop_carrier_sense (void) |
| Stop the timer (started with MCU_API_timer_start_carrier_sense) More... | |
| sfx_u8 | MCU_API_timer_wait_for_end (void) |
| Blocking function to wait for interrupt indicating timer elapsed. This function is only used for the 20 seconds wait in downlink. More... | |
| void | ST_MCU_API_WaitForInterrupt (void) |
| Microcontroller waits for interrupt. This function is continously called by the library each time it waits for an event. This is useful if the application must trigger a state machine and not block the CPU waiting for an event from the library. For example, this can be a null implementation or can activate a low power mode of the microcontroller, tick a stack for dual radio applications or other type of state machines. More... | |
| void | setNotifyEndFlag (uint8_t notifyEnd) |
| Set notify end flag. More... | |
| void | setNIntermediateTimIrqFlag (uint8_t nIntermediateTimeIrq) |
| Set N intermediate TIM IRQ flag. More... | |
| uint8_t | getNotifyEndFlag (void) |
| Get notify end flag. More... | |
| uint32_t | getNIntermediateTimIrqFlag (void) |
| Get N intermediate TIM IRQ flag. More... | |
Variables | |
| volatile uint32_t | lSystickCounter = 0 |
| RTC_HandleTypeDef * | rtcHandler |
| TIM_HandleTypeDef | htim6 |
: This file provides code for the configuration of the TIM instances.
This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
| #define ABS | ( | x | ) | (x>0?x:-x) |
Absolute value macro.
| x | Value on which apply the abs function. |
| None |
| uint32_t getNIntermediateTimIrqFlag | ( | void | ) |
Get N intermediate TIM IRQ flag.
| [in] | none | |
| [out] | none |
| n_intermediate_tim_irq | 1 or 0 |
| uint8_t getNotifyEndFlag | ( | void | ) |
Get notify end flag.
| [in] | none | |
| [out] | none |
| notify_end | 1 or 0 |
| sfx_u8 MCU_API_timer_start | ( | sfx_u32 | time_duration_in_s | ) |
Start timer for in second duration.
| [in] | sfx_u32 | time_duration_in_s Timer value in seconds |
| [out] | none |
| SFX_ERR_NONE | No error |
| MCU_ERR_API_TIMER_START | Start timer error |
| sfx_u8 MCU_API_timer_start_carrier_sense | ( | sfx_u16 | time_duration_in_ms | ) |
Start timer for :
| [in] | sfx_u16 | time_duration_in_ms Timer value in milliseconds |
| [out] | none |
| SFX_ERR_NONE | No error |
| MCU_ERR_API_TIMER_START_CS | Start CS timer error |
| sfx_u8 MCU_API_timer_stop | ( | void | ) |
Stop the timer (started with MCU_API_timer_start)
| [in] | none | |
| [out] | none |
| SFX_ERR_NONE | No error |
| MCU_ERR_API_TIMER_STOP | Stop timer error |
| sfx_u8 MCU_API_timer_stop_carrier_sense | ( | void | ) |
Stop the timer (started with MCU_API_timer_start_carrier_sense)
| [in] | none | |
| [out] | none |
| SFX_ERR_NONE | No error |
| MCU_ERR_API_TIMER_STOP_CS | Stop timer error |
| sfx_u8 MCU_API_timer_wait_for_end | ( | void | ) |
Blocking function to wait for interrupt indicating timer elapsed.
This function is only used for the 20 seconds wait in downlink.
| [in] | none | |
| [out] | none |
| SFX_ERR_NONE | No error |
| MCU_ERR_API_TIMER_END | Wait end of timer error |
| void setNIntermediateTimIrqFlag | ( | uint8_t | nIntermediateTimeIrq | ) |
Set N intermediate TIM IRQ flag.
| [in] | nIntermediateTimeIrq | 1 or 0 |
| [out] | none |
| none |
| void setNotifyEndFlag | ( | uint8_t | notifyEnd | ) |
Set notify end flag.
| [in] | notifyEnd | 1 or 0 |
| [out] | none |
| none |
| void ST_MCU_API_WaitForInterrupt | ( | void | ) |
Microcontroller waits for interrupt. This function is continously called by the library each time it waits for an event. This is useful if the application must trigger a state machine and not block the CPU waiting for an event from the library. For example, this can be a null implementation or can activate a low power mode of the microcontroller, tick a stack for dual radio applications or other type of state machines.
| [in] | None. |
| None. |