|
ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
|
ICARUS OS Hardware Abstraction Layer Implementation. More...
Go to the source code of this file.
Functions | |
| static void | SystemClock_Config (void) |
| Configure system clocks for 480MHz operation. | |
| uint32_t | task_active_sleep (uint32_t ticks) |
| Sleep for specified ticks (cooperative, via SVC) | |
| int32_t | platform_write (void *handle, uint8_t reg, const uint8_t *bufp, uint16_t len) |
| Platform write function for LSM9DS1 IMU driver. | |
| int32_t | platform_read (void *handle, uint8_t reg, uint8_t *bufp, uint16_t len) |
| Platform read function for LSM9DS1 IMU driver. | |
| static void | CPU_CACHE_Enable (void) |
| Enable CPU instruction and data caches. | |
| void | LED_Blink (uint32_t Hdelay, uint32_t Ldelay) |
| Blink LED with specified on/off timing. | |
| void | LED_On (void) |
| Turn LED on (active high) | |
| void | LED_Off (void) |
| Turn LED off. | |
| void | hal_init (void) |
| Initialize all hardware abstraction layer components. | |
ICARUS OS Hardware Abstraction Layer Implementation.
Provides hardware initialization and low-level platform services for the STM32H750VBT6 target. Includes:
Definition in file retarget_hal.c.
|
static |
Enable CPU instruction and data caches.
Enables both I-Cache and D-Cache for improved performance. Must be called after MPU configuration to ensure proper cacheability attributes are in effect.
Definition at line 66 of file retarget_hal.c.
Referenced by hal_init().
| void hal_init | ( | void | ) |
Initialize all hardware abstraction layer components.
Master initialization function that configures all hardware:
Definition at line 201 of file retarget_hal.c.
References BSP_FLASH_BASE, CPU_CACHE_Enable(), MPU_Config(), MX_GPIO_Init(), MX_I2C2_Init(), MX_RTC_Init(), MX_SPI4_Init(), MX_TIM1_Init(), MX_USB_DEVICE_Init(), and SystemClock_Config().
Referenced by main().
| void LED_Blink | ( | uint32_t | Hdelay, |
| uint32_t | Ldelay | ||
| ) |
Blink LED with specified on/off timing.
Blink LED with specified timing.
Turns LED on for specified duration, then off for specified duration. Uses task_active_sleep() for non-blocking delays.
| [in] | Hdelay | LED on duration in OS ticks |
| [in] | Ldelay | LED off duration in OS ticks |
Definition at line 93 of file retarget_hal.c.
References E3_GPIO_Port, E3_Pin, and task_active_sleep().
Referenced by main(), and os_heartbeat_task().
| void LED_Off | ( | void | ) |
Turn LED off.
Sets PE3 GPIO pin low to turn off the onboard LED.
Definition at line 118 of file retarget_hal.c.
References E3_GPIO_Port, and E3_Pin.
Referenced by os_heartbeat_task().
| void LED_On | ( | void | ) |
Turn LED on (active high)
Turn LED on.
Sets PE3 GPIO pin high to illuminate the onboard LED.
Definition at line 107 of file retarget_hal.c.
References E3_GPIO_Port, and E3_Pin.
Referenced by os_heartbeat_task().
| int32_t platform_read | ( | void * | handle, |
| uint8_t | reg, | ||
| uint8_t * | bufp, | ||
| uint16_t | len | ||
| ) |
Platform read function for LSM9DS1 IMU driver.
Reads data from IMU register via I2C. Used by the LSM9DS1 driver library for sensor data acquisition.
| [in] | handle | I2C handle (cast to I2C_HandleTypeDef*) |
| [in] | reg | Register address to read |
| [out] | bufp | Pointer to receive buffer |
| [in] | len | Number of bytes to read |
Definition at line 167 of file retarget_hal.c.
References IMU_ADDRESS.
| int32_t platform_write | ( | void * | handle, |
| uint8_t | reg, | ||
| const uint8_t * | bufp, | ||
| uint16_t | len | ||
| ) |
Platform write function for LSM9DS1 IMU driver.
Writes data to IMU register via I2C. Used by the LSM9DS1 driver library for register configuration.
| [in] | handle | I2C handle (cast to I2C_HandleTypeDef*) |
| [in] | reg | Register address to write |
| [in] | bufp | Pointer to data buffer |
| [in] | len | Number of bytes to write |
Definition at line 141 of file retarget_hal.c.
References IMU_ADDRESS.
|
static |
Configure system clocks for 480MHz operation.
Configures the complete clock tree:
| Bus | Divider | Frequency |
|---|---|---|
| SYSCLK | /1 | 480 MHz |
| HCLK | /2 | 240 MHz |
| APB1 | /1 | 120 MHz |
| APB2 | /1 | 120 MHz |
| APB3 | /1 | 120 MHz |
| APB4 | /1 | 120 MHz |
Supply configuration update enable
< Core domains are supplied from the LDO
Configure the main internal regulator output voltage
Initializes the RCC Oscillators according to the specified parameters in the RCC_OscInitTypeDef structure.
< Clock range frequency between 4 and 8 MHz
Initializes the CPU, AHB and APB buses clocks
< FLASH One Latency cycle
Definition at line 292 of file retarget_hal.c.
References Error_Handler().
Referenced by hal_init().
|
extern |
Sleep for specified ticks (cooperative, via SVC)
Sleep for specified ticks (cooperative)
Definition at line 522 of file svc.c.
Referenced by LED_Blink().