Contiki 2.5
|
Utility and convenience functions for STM32W108 microcontroller, common to both the full and minimal hal. More...
Go to the source code of this file.
Macros | |
#define | PORTA_PIN(y) (PORTA|y) |
Some registers and variables require indentifying GPIO by a single number instead of the port and pin. More... | |
#define | PORTB_PIN(y) (PORTB|y) |
Some registers and variables require indentifying GPIO by a single number instead of the port and pin. More... | |
#define | PORTC_PIN(y) (PORTC|y) |
Some registers and variables require indentifying GPIO by a single number instead of the port and pin. More... | |
#define | PORTx_PIN(x, y) (x|y) |
Some registers and variables require indentifying GPIO by a single number instead of the port and pin. More... | |
Functions | |
void | halInternalResetWatchDog (void) |
Resets the watchdog timer. More... | |
void | halGpioConfig (int32u io, int32u config) |
Configure an IO pin's operating mode. More... | |
void | halGpioSet (int32u io, boolean value) |
Set/Clear single GPIO bit. More... | |
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. More... | |
int16u | stMeasureVddSlow (void) |
Takes a slow ADC measurement of VDD_PADS in millivolts. More... | |
int16u | stMeasureVddFast (void) |
Takes a fast ADC measurement of VDD_PADS in millivolts. More... | |
void | halCommonCalibratePads (void) |
Calibrates the GPIO pads. More... | |
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. More... | |
void | halInternalSwitchToXtal (void) |
Switches to running off of the 24MHz crystal, including changing the CPU to be 24MHz (FCLK sourced from SYSCLK). More... | |
void | halInternalSearchForBiasTrim (void) |
Search for optimal 24MHz crystal bias trim, assuming no valid prior value. More... | |
void | halCommonDelayMilliseconds (int16u ms) |
Blocks the current thread of execution for the specified amount of time, in milliseconds. More... | |
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. More... | |
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. More... | |
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. More... | |
int32u | halGetWakeInfo (void) |
Obtains the events that caused the last wake from sleep. More... | |
void | halCommonSeedRandom (int32u seed) |
Seeds the halCommonGetRandom() pseudorandom number generator. More... | |
int16u | halCommonGetRandom (void) |
Runs a standard LFSR to generate pseudorandom numbers. More... | |
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.