|
|
@ -75,6 +75,8 @@ |
|
|
|
#include <px4_platform/board_determine_hw_info.h> |
|
|
|
#include <px4_platform/board_determine_hw_info.h> |
|
|
|
#include <px4_platform/board_dma_alloc.h> |
|
|
|
#include <px4_platform/board_dma_alloc.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <mpu.h> |
|
|
|
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
/****************************************************************************
|
|
|
|
* Pre-Processor Definitions |
|
|
|
* Pre-Processor Definitions |
|
|
|
****************************************************************************/ |
|
|
|
****************************************************************************/ |
|
|
@ -160,6 +162,16 @@ __EXPORT void board_on_reset(int status) |
|
|
|
__EXPORT void |
|
|
|
__EXPORT void |
|
|
|
stm32_boardinitialize(void) |
|
|
|
stm32_boardinitialize(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
// clear all existing MPU configuration from bootloader
|
|
|
|
|
|
|
|
for (int region = 0; region < CONFIG_ARM_MPU_NREGIONS; region++) { |
|
|
|
|
|
|
|
putreg32(region, MPU_RNR); |
|
|
|
|
|
|
|
putreg32(0, MPU_RBAR); |
|
|
|
|
|
|
|
putreg32(0, MPU_RASR); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// save
|
|
|
|
|
|
|
|
putreg32(0, MPU_CTRL); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
board_on_reset(-1); /* Reset PWM first thing */ |
|
|
|
board_on_reset(-1); /* Reset PWM first thing */ |
|
|
|
|
|
|
|
|
|
|
|
/* configure LEDs */ |
|
|
|
/* configure LEDs */ |
|
|
|