Contiki 2.6
|
Utility and convenience functions for STM32W108 microcontroller, common to both the full and minimal hal. More...
Go to the source code of this file.
Defines | |
#define | PORTA_PIN(y) (PORTA|y) |
Some registers and variables require indentifying GPIO by a single number instead of the port and pin. | |
#define | PORTB_PIN(y) (PORTB|y) |
Some registers and variables require indentifying GPIO by a single number instead of the port and pin. | |
#define | PORTC_PIN(y) (PORTC|y) |
Some registers and variables require indentifying GPIO by a single number instead of the port and pin. | |
#define | PORTx_PIN(x, y) (x|y) |
Some registers and variables require indentifying GPIO by a single number instead of the port and pin. | |
Functions | |
void | halInternalResetWatchDog (void) |
Resets the watchdog timer. | |
void | halGpioConfig (int32u io, int32u config) |
Configure an IO pin's operating mode. | |
void | halGpioSet (int32u io, boolean value) |
Set/Clear single GPIO bit. | |
void | halInternalCalibrateSlowRc (void) |
Calibrates the internal SlowRC to generate a 1024 Hz (1kHz) clock. | |
void | halInternalCalibrateFastRc (void) |
Calibrates the internal FastRC to generate a 12Mhz clock. | |
void | halInternalSetRegTrim (boolean boostMode) |
Sets the trim values for the 1.8V and 1.2V regulators based upon manufacturing configuration. | |
int16u | stMeasureVddSlow (void) |
Takes a slow ADC measurement of VDD_PADS in millivolts. | |
int16u | stMeasureVddFast (void) |
Takes a fast ADC measurement of VDD_PADS in millivolts. | |
void | halCommonCalibratePads (void) |
Calibrates the GPIO pads. | |
void | halCommonCheckXtalBiasTrim (void) |
This function is intended to be called periodically, from the stack and application, to check the XTAL bias trim is within appropriate levels and adjust if not. | |
void | halInternalSwitchToXtal (void) |
Switches to running off of the 24MHz crystal, including changing the CPU to be 24MHz (FCLK sourced from SYSCLK). | |
void | halInternalSearchForBiasTrim (void) |
Search for optimal 24MHz crystal bias trim, assuming no valid prior value. | |
void | halCommonDelayMilliseconds (int16u ms) |
Blocks the current thread of execution for the specified amount of time, in milliseconds. | |
void | halSleepWithOptions (SleepModes sleepMode, int32u gpioWakeBitMask) |
Puts the microcontroller to sleep in a specified mode, allows the GPIO wake sources to be determined at runtime. | |
StStatus | halSleepForQsWithOptions (int32u *duration, int32u gpioWakeBitMask) |
Uses the system timer to enter ::SLEEPMODE_WAKETIMER for approximately the specified amount of time (provided in quarter seconds), the GPIO wake sources can be provided at runtime. | |
void | halInternalIdleSleep (void) |
Provides access to assembly code which triggers idle sleep. | |
void | halInternalSleep (SleepModes sleepMode) |
Puts the microcontroller to sleep in a specified mode. | |
int32u | halGetWakeInfo (void) |
Obtains the events that caused the last wake from sleep. | |
void | halCommonSeedRandom (int32u seed) |
Seeds the halCommonGetRandom() pseudorandom number generator. | |
int16u | halCommonGetRandom (void) |
Runs a standard LFSR to generate pseudorandom numbers. |
Utility and convenience functions for STM32W108 microcontroller, common to both the full and minimal hal.
See Micro for documentation.
Definition in file micro-common.h.