mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Bootloader: support building on STM32H7
This commit is contained in:
parent
aab911ac50
commit
4d3cbd95ac
@ -222,7 +222,12 @@ jump_to_app()
|
||||
led_set(LED_OFF);
|
||||
|
||||
// resetting the clocks is needed for loading NuttX
|
||||
#if defined(STM32H7)
|
||||
rccDisableAPB1L(~0);
|
||||
rccDisableAPB1H(~0);
|
||||
#else
|
||||
rccDisableAPB1(~0);
|
||||
#endif
|
||||
rccDisableAPB2(~0);
|
||||
#if HAL_USE_SERIAL_USB == TRUE
|
||||
rccResetOTG_FS();
|
||||
|
17
Tools/AP_Bootloader/mcu_h7.h
Normal file
17
Tools/AP_Bootloader/mcu_h7.h
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
MCU tables for STM32H7
|
||||
*/
|
||||
|
||||
#if defined(STM32H7)
|
||||
|
||||
#define STM32_UNKNOWN 0
|
||||
|
||||
mcu_des_t mcu_descriptions[] = {
|
||||
{ STM32_UNKNOWN, "STM32H7?????", '?'},
|
||||
};
|
||||
|
||||
const mcu_rev_t silicon_revs[] = {
|
||||
};
|
||||
|
||||
#endif // STM32H7
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "support.h"
|
||||
#include "mcu_f4.h"
|
||||
#include "mcu_f7.h"
|
||||
#include "mcu_h7.h"
|
||||
|
||||
static BaseChannel *uarts[] = { BOOTLOADER_DEV_LIST };
|
||||
#if HAL_USE_SERIAL == TRUE
|
||||
@ -113,6 +114,9 @@ void flash_func_erase_sector(uint32_t sector)
|
||||
// read one-time programmable memory
|
||||
uint32_t flash_func_read_otp(uint32_t idx)
|
||||
{
|
||||
#ifndef OTP_SIZE
|
||||
return 0;
|
||||
#else
|
||||
if (idx & 3) {
|
||||
return 0;
|
||||
}
|
||||
@ -122,6 +126,7 @@ uint32_t flash_func_read_otp(uint32_t idx)
|
||||
}
|
||||
|
||||
return *(uint32_t *)(idx + OTP_BASE);
|
||||
#endif
|
||||
}
|
||||
|
||||
// read chip serial number
|
||||
|
Loading…
Reference in New Issue
Block a user