extracted stm32 code
This commit is contained in:
@ -29,6 +29,10 @@ if(TGT_BSP MATCHES "arm/raspberrypi")
|
|||||||
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
|
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(TGT_BSP MATCHES "arm/stm32h743zi-nucleo")
|
||||||
|
set(FSFW_HAL_ADD_STM32H7 ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Perform steps like loading toolchain files where applicable.
|
# Perform steps like loading toolchain files where applicable.
|
||||||
include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
|
include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
|
||||||
pre_project_config()
|
pre_project_config()
|
||||||
@ -37,7 +41,6 @@ pre_project_config()
|
|||||||
project(fsfw_example ASM C CXX)
|
project(fsfw_example ASM C CXX)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Pre-Sources preparation
|
# Pre-Sources preparation
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -29,6 +29,7 @@ target_sources(${LIB_STM_HAL_NAME} PRIVATE
|
|||||||
Src/stm32h7xx_hal_pwr.c
|
Src/stm32h7xx_hal_pwr.c
|
||||||
Src/stm32h7xx_hal_pwr_ex.c
|
Src/stm32h7xx_hal_pwr_ex.c
|
||||||
Src/stm32h7xx_hal_i2c.c
|
Src/stm32h7xx_hal_i2c.c
|
||||||
|
Src/stm32h7xx_hal_spi.c
|
||||||
Src/stm32h7xx_hal_i2c_ex.c
|
Src/stm32h7xx_hal_i2c_ex.c
|
||||||
Src/stm32h7xx_hal_uart.c
|
Src/stm32h7xx_hal_uart.c
|
||||||
Src/stm32h7xx_hal_uart_ex.c
|
Src/stm32h7xx_hal_uart_ex.c
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
#include "stm32h7xx_nucleo.h"
|
#include "stm32h7xx_nucleo.h"
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
|
||||||
|
#include "fsfw_hal/stm32h7/devicetest/GyroL3GD20H.h"
|
||||||
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
STM32TestTask::STM32TestTask(object_id_t objectId, bool enablePrintout,
|
STM32TestTask::STM32TestTask(object_id_t objectId, bool enablePrintout,
|
||||||
bool blinkyLed): TestTask(objectId, enablePrintout),
|
bool blinkyLed): TestTask(objectId, enablePrintout),
|
||||||
blinkyLed(blinkyLed) {
|
blinkyLed(blinkyLed) {
|
||||||
@ -19,5 +22,11 @@ ReturnValue_t STM32TestTask::performPeriodicAction() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t STM32TestTask::performOneShotAction() {
|
ReturnValue_t STM32TestTask::performOneShotAction() {
|
||||||
|
performSpiL3gd20hTest();
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void STM32TestTask::performSpiL3gd20hTest() {
|
||||||
|
SPI_HandleTypeDef spiHandle = {};
|
||||||
|
GyroL3GD20H gyroDevice(&spiHandle);
|
||||||
|
}
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
#define BSP_STM32_BOARDTEST_STM32TESTTASK_H_
|
#define BSP_STM32_BOARDTEST_STM32TESTTASK_H_
|
||||||
|
|
||||||
#include <test/TestTask.h>
|
#include <test/TestTask.h>
|
||||||
|
#include "stm32h7xx_hal.h"
|
||||||
|
#include "stm32h7xx_hal_spi.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class STM32TestTask: public TestTask {
|
class STM32TestTask: public TestTask {
|
||||||
public:
|
public:
|
||||||
@ -10,6 +14,7 @@ public:
|
|||||||
ReturnValue_t performPeriodicAction() override;
|
ReturnValue_t performPeriodicAction() override;
|
||||||
ReturnValue_t performOneShotAction() override;
|
ReturnValue_t performOneShotAction() override;
|
||||||
|
|
||||||
|
void performSpiL3gd20hTest();
|
||||||
private:
|
private:
|
||||||
|
|
||||||
bool blinkyLed = false;
|
bool blinkyLed = false;
|
||||||
|
BIN
doc/stm32_nucleo/stm32h743-rm0433-datasheet.pdf
Normal file
BIN
doc/stm32_nucleo/stm32h743-rm0433-datasheet.pdf
Normal file
Binary file not shown.
2
fsfw_hal
2
fsfw_hal
Submodule fsfw_hal updated: 4ba4e45789...4c546820fd
Reference in New Issue
Block a user