mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 19:40:31 +03:00
AT32 development, introduction of AT32F435 target (#12247)
* AT32F435: new target (#12159) * AT32F435: New target (WIP) * IO and Timer Updates * Adding pseudonyms for the STM TypeDef items. - implementation to follow * Adding config_streamer support for AT32 * Implementation for IO * Adding in Peripheral mapping from emsr. * Warnings cleanup for AT drivers * Getting things to the linking stage * Add AT-START-F435 LEDs as default in AT32F435 as a temporary measure to aid bringup * Remove tabs * Enable selection of serial port to use for MSP * Setup defaults for AT-START-F435 to use MSP on UART1 * Fix for most recent 4.5.0 Makefile changes * Solve for sanity check. * Add AT32F435 MCU type * Fix compilation issue with SITL * Merge conflict resolution * Minor cleanup * Adding line feed. --------- Co-authored-by: Steve Evans <Steve@SCEvans.com>
This commit is contained in:
parent
8900a831e5
commit
74be33dfbc
58 changed files with 6256 additions and 84 deletions
|
@ -35,7 +35,7 @@
|
|||
|
||||
#include "system.h"
|
||||
|
||||
#if defined(STM32F4) || defined(STM32F7) || defined(STM32H7)
|
||||
#if defined(STM32F4) || defined(STM32F7) || defined(STM32H7) || defined(AT32F4)
|
||||
// See "RM CoreSight Architecture Specification"
|
||||
// B2.3.10 "LSR and LAR, Software Lock Status Register and Software Lock Access Register"
|
||||
// "E1.2.11 LAR, Lock Access Register"
|
||||
|
@ -57,6 +57,10 @@ void cycleCounterInit(void)
|
|||
{
|
||||
#if defined(USE_HAL_DRIVER)
|
||||
cpuClockFrequency = HAL_RCC_GetSysClockFreq();
|
||||
#elif defined(USE_ATBSP_DRIVER)
|
||||
crm_clocks_freq_type clocks;
|
||||
crm_clocks_freq_get(&clocks);
|
||||
cpuClockFrequency = clocks.sclk_freq;
|
||||
#else
|
||||
RCC_ClocksTypeDef clocks;
|
||||
RCC_GetClocksFreq(&clocks);
|
||||
|
@ -67,7 +71,7 @@ void cycleCounterInit(void)
|
|||
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
|
||||
|
||||
#if defined(DWT_LAR_UNLOCK_VALUE)
|
||||
#if defined(STM32H7)
|
||||
#if defined(STM32H7) || defined(AT32F4)
|
||||
ITM->LAR = DWT_LAR_UNLOCK_VALUE;
|
||||
#elif defined(STM32F7)
|
||||
DWT->LAR = DWT_LAR_UNLOCK_VALUE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue