mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Merge pull request #7383 from jflyper/bfdev-f4-vector-table-relocation
[F4] Relocate ISR vector table to RAM
This commit is contained in:
commit
2bf2ded102
4 changed files with 33 additions and 9 deletions
|
@ -187,9 +187,12 @@ void systemInit(void)
|
|||
// cache RCC->CSR value to use it in isMPUSoftReset() and others
|
||||
cachedRccCsrValue = RCC->CSR;
|
||||
|
||||
/* Accounts for OP Bootloader, set the Vector Table base address as specified in .ld file */
|
||||
extern void *isr_vector_table_base;
|
||||
// Although VTOR is already loaded with a possible vector table in RAM,
|
||||
// removing the call to NVIC_SetVectorTable causes USB not to become active,
|
||||
|
||||
extern uint8_t isr_vector_table_base;
|
||||
NVIC_SetVectorTable((uint32_t)&isr_vector_table_base, 0x0);
|
||||
|
||||
RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_OTG_FS, DISABLE);
|
||||
|
||||
RCC_ClearFlag();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue