Prusa MINI Firmware overview
thread_measurement.h
Go to the documentation of this file.
1 /*
2  * thread_measurement.h
3  *
4  * Created on: 2019-12-17
5  * Author: Radek Vana
6  */
7 
8 #ifndef _THREAD_MEASUREMENT_H
9 #define _THREAD_MEASUREMENT_H
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif //__cplusplus
14 
15 void StartMeasurementTask(void const *argument);
16 
17 #ifdef __cplusplus
18 }
19 #endif //__cplusplus
20 
21 #endif //_THREAD_MEASUREMENT_H
filament_sensor.h
SPI_BAUDRATEPRESCALER_2
#define SPI_BAUDRATEPRESCALER_2
Definition: stm32f4xx_hal_spi.h:236
HAL_OK
Definition: stm32f4xx_hal_def.h:57
marlin_client.h
sys_spi_set_prescaler
void sys_spi_set_prescaler(int prescaler_num)
Definition: sys.cpp:230
RCC_ClkInitTypeDef
RCC System, AHB and APB busses clock configuration structure definition.
Definition: stm32f4xx_hal_rcc.h:93
sys_reset
void sys_reset(void)
Definition: sys.cpp:20
SPI_BAUDRATEPRESCALER_16
#define SPI_BAUDRATEPRESCALER_16
Definition: stm32f4xx_hal_spi.h:239
HAL_RCC_OscConfig
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
RCC_ClkInitTypeDef::SYSCLKSource
uint32_t SYSCLKSource
Definition: stm32f4xx_hal_rcc.h:98
__SPI_HandleTypeDef
SPI handle Structure definition.
Definition: stm32f4xx_hal_spi.h:120
SPI_BAUDRATEPRESCALER_256
#define SPI_BAUDRATEPRESCALER_256
Definition: stm32f4xx_hal_spi.h:243
thread_measurement.h
HSE_VALUE
#define HSE_VALUE
Adjust the value of External High Speed oscillator (HSE) used in your application....
Definition: stm32f4xx_hal_conf.h:108
FLASH_FLAG_EOP
#define FLASH_FLAG_EOP
Definition: stm32f4xx_hal_flash.h:132
VOLTAGE_RANGE_3
#define VOLTAGE_RANGE_3
Definition: stm32_hal_legacy.h:317
HAL_FLASH_Unlock
HAL_StatusTypeDef HAL_FLASH_Unlock(void)
_dbg0
#define _dbg0
Definition: dbg.h:31
sys_fw_update_on_restart_enable
void sys_fw_update_on_restart_enable(void)
Definition: sys.cpp:257
pd
#define pd
Definition: screen_filebrowser.cpp:39
StartMeasurementTask
void StartMeasurementTask(void const *argument)
Definition: thread_measurement.c:7
sys.h
ram_data_exchange
volatile data_exchange_t ram_data_exchange
hspi2
SPI_HandleTypeDef hspi2
Definition: main.c:81
sys_fw_validate
int sys_fw_validate(void)
Definition: sys.cpp:281
i
uint8_t i
Definition: screen_test_graph.c:72
sys_fw_update_on_restart_is_enabled
int sys_fw_update_on_restart_is_enabled(void)
Definition: sys.cpp:253
SPI_BAUDRATEPRESCALER_32
#define SPI_BAUDRATEPRESCALER_32
Definition: stm32f4xx_hal_spi.h:240
fs_init_on_level
void fs_init_on_level()
Definition: filament_sensor.c:128
sys_fw_update_on_restart_disable
void sys_fw_update_on_restart_disable(void)
Definition: sys.cpp:261
dbg.h
marlin_client_loop
void marlin_client_loop(void)
Definition: marlin_client.c:118
sys_pll_is_enabled
int sys_pll_is_enabled(void)
Definition: sys.cpp:48
st25dv64k_user_write
void st25dv64k_user_write(uint16_t address, uint8_t data)
Definition: st25dv64k.c:103
psys_fw_valid
volatile uint8_t * psys_fw_valid
Definition: sys.cpp:18
FLASH_TYPEPROGRAM_BYTE
#define FLASH_TYPEPROGRAM_BYTE
Definition: stm32f4xx_hal_flash.h:120
osDelay
osStatus osDelay(uint32_t millisec)
Wait for Timeout (Time Delay)
Definition: cmsis_os.c:365
new_eeprom.h
RCC_SYSCLKSOURCE_HSE
#define RCC_SYSCLKSOURCE_HSE
Definition: stm32f4xx_hal_rcc.h:220
FLASH_FLAG_PGSERR
#define FLASH_FLAG_PGSERR
Definition: stm32f4xx_hal_flash.h:137
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32f4xx_hal_def.h:55
RCC_PLL_ON
#define RCC_PLL_ON
Definition: stm32f4xx_hal_rcc.h:178
sys_fw_update_disable
void sys_fw_update_disable(void)
Definition: sys.cpp:249
sys_dfu_boot
void sys_dfu_boot(void)
Definition: sys.cpp:31
sys_flash_write
int sys_flash_write(void *dst, void *src, int size)
Definition: sys.cpp:293
sys_sscg_enable
void sys_sscg_enable(void)
Definition: sys.cpp:140
sys_pll_enable
void sys_pll_enable(void)
Definition: sys.cpp:78
FLASH_FLAG_BSY
#define FLASH_FLAG_BSY
Definition: stm32f4xx_hal_flash.h:141
HAL_FLASH_Lock
HAL_StatusTypeDef HAL_FLASH_Lock(void)
marlin_client_init
marlin_vars_t * marlin_client_init(void)
Definition: marlin_client.c:84
SPI_BAUDRATEPRESCALER_4
#define SPI_BAUDRATEPRESCALER_4
Definition: stm32f4xx_hal_spi.h:237
SPI_BAUDRATEPRESCALER_64
#define SPI_BAUDRATEPRESCALER_64
Definition: stm32f4xx_hal_spi.h:241
RCC_OscInitTypeDef::PLL
RCC_PLLInitTypeDef PLL
Definition: stm32f4xx_hal_rcc.h:87
SPI_BAUDRATEPRESCALER_128
#define SPI_BAUDRATEPRESCALER_128
Definition: stm32f4xx_hal_spi.h:242
sys_fw_is_valid
int sys_fw_is_valid(void)
Definition: sys.cpp:266
FLASH_FLAG_PGAERR
#define FLASH_FLAG_PGAERR
Definition: stm32f4xx_hal_flash.h:135
RCC_PLL_OFF
#define RCC_PLL_OFF
Definition: stm32f4xx_hal_rcc.h:177
HAL_SPI_DeInit
HAL_StatusTypeDef HAL_SPI_DeInit(SPI_HandleTypeDef *hspi)
RCC_PLLInitTypeDef::PLLState
uint32_t PLLState
Definition: stm32f4xx_hal_rcc_ex.h:65
FLASH_Erase_Sector
void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange)
FW_UPDATE_ENABLE
#define FW_UPDATE_ENABLE
Definition: shared_config.h:11
HAL_FLASH_Program
HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data)
HAL_SPI_Init
HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi)
sys_fw_update_enable
void sys_fw_update_enable(void)
Definition: sys.cpp:245
__HAL_FLASH_CLEAR_FLAG
#define __HAL_FLASH_CLEAR_FLAG(__FLAG__)
Clear the specified FLASH flags.
Definition: stm32f4xx_hal_flash.h:307
FLASH_FLAG_PGPERR
#define FLASH_FLAG_PGPERR
Definition: stm32f4xx_hal_flash.h:136
sys_sscg_set_config
void sys_sscg_set_config(int freq, int depth)
Definition: sys.cpp:159
sys_flash_is_empty
int sys_flash_is_empty(void *ptr, int size)
Definition: sys.cpp:285
HAL_RCC_GetOscConfig
void HAL_RCC_GetOscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
uint8_t
const uint8_t[]
Definition: 404_html.c:3
sys_fw_invalidate
int sys_fw_invalidate(void)
Definition: sys.cpp:271
_spi_prescaler
uint32_t _spi_prescaler(int prescaler_num)
Definition: sys.cpp:208
sys_sscg_disable
void sys_sscg_disable(void)
Definition: sys.cpp:125
FLASH_FLAG_OPERR
#define FLASH_FLAG_OPERR
Definition: stm32f4xx_hal_flash.h:133
sys_fw_update_is_enabled
int sys_fw_update_is_enabled(void)
Definition: sys.cpp:241
__SPI_HandleTypeDef::Init
SPI_InitTypeDef Init
Definition: stm32f4xx_hal_spi.h:124
sys_pll_disable
void sys_pll_disable(void)
Definition: sys.cpp:57
sys_calc_flash_latency
int sys_calc_flash_latency(int freq)
Definition: sys.cpp:34
sys_flash_erase_sector
int sys_flash_erase_sector(unsigned int sector)
Definition: sys.cpp:323
stm32f4xx_hal.h
This file contains all the functions prototypes for the HAL module driver.
status
static status_t status
Definition: filament_sensor.c:37
data_exchange_t::fw_update_flag
uint8_t fw_update_flag
Definition: shared_config.h:20
shared_config.h
RCC_SYSCLKSOURCE_PLLCLK
#define RCC_SYSCLKSOURCE_PLLCLK
Definition: stm32f4xx_hal_rcc.h:221
SPI_InitTypeDef::BaudRatePrescaler
uint32_t BaudRatePrescaler
Definition: stm32f4xx_hal_spi.h:84
StartMeasurementTask
void StartMeasurementTask(void const *argument)
Definition: thread_measurement.c:7
HAL_RCC_ClockConfig
HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
sys_sscg_get_config
int sys_sscg_get_config(float *pfreq, float *pdepth)
Definition: sys.cpp:204
boot_version
version_t & boot_version
Definition: sys.cpp:16
FW_UPDATE_FLAG_ADDRESS
#define FW_UPDATE_FLAG_ADDRESS
Definition: new_eeprom.h:20
RCC_OscInitTypeDef
RCC Internal/External Oscillator (HSE, HSI, LSE and LSI) configuration structure definition.
Definition: stm32f4xx_hal_rcc.h:67
SPI_BAUDRATEPRESCALER_8
#define SPI_BAUDRATEPRESCALER_8
Definition: stm32f4xx_hal_spi.h:238
__attribute__
volatile data_exchange_t ram_data_exchange __attribute__((section(".boot_fw_data_exchange")))
version_t
Definition: shared_config.h:38
st25dv64k_user_read
uint8_t st25dv64k_user_read(uint16_t address)
Definition: st25dv64k.c:93
fs_cycle
void fs_cycle()
Definition: filament_sensor.c:185
st25dv64k.h
RCC_PLLInitTypeDef::PLLN
uint32_t PLLN
Definition: stm32f4xx_hal_rcc_ex.h:74
data_exchange_t
Definition: shared_config.h:19
sys_sscg_is_enabled
int sys_sscg_is_enabled(void)
Definition: sys.cpp:121
HAL_RCC_GetClockConfig
void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency)
cmsis_os.h
Header of cmsis_os.c A new set of APIs are added in addition to existing ones, these APIs are specifi...
FLASH_FLAG_WRPERR
#define FLASH_FLAG_WRPERR
Definition: stm32f4xx_hal_flash.h:134
BOOTLOADER_VERSION_ADDRESS
#define BOOTLOADER_VERSION_ADDRESS
Definition: shared_config.h:8
sys_pll_freq
int sys_pll_freq
Definition: sys.cpp:12
FW_UPDATE_DISABLE
#define FW_UPDATE_DISABLE
Definition: shared_config.h:12
size
static png_bytep size_t size
Definition: pngwrite.c:2170