Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 16MHz HSE for L431 #153

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Inc/targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,15 @@
#define FIRMWARE_NAME "SierraPulse1"
#define FILE_NAME "SIERRA_PULSE1_L431_CAN"
#define DRONECAN_SUPPORT 1
#define DEAD_TIME 45
#define USE_HSE
#undef HSE_VALUE
#define HSE_VALUE 16000000
#define DEAD_TIME 120
#define HARDWARE_GROUP_L4_C
#define TARGET_VOLTAGE_DIVIDER 100
#define MILLIVOLT_PER_AMP 100
#define TARGET_VOLTAGE_DIVIDER 210
#define MILLIVOLT_PER_AMP 10
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#define USE_SERIAL_TELEMETRY
#endif

Expand Down
2 changes: 2 additions & 0 deletions Mcu/l431/Src/peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ void SystemClock_Config(void)
LL_RCC_HSE_Enable();
#if HSE_VALUE == 24000000
LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_HSE, LL_RCC_PLLM_DIV_3, 20, LL_RCC_PLLR_DIV_2);
#elif HSE_VALUE == 16000000
LL_RCC_PLL_ConfigDomain_SYS(LL_RCC_PLLSOURCE_HSE, LL_RCC_PLLM_DIV_2, 20, LL_RCC_PLLR_DIV_2);
#else
#error "Unsupported HSE_VALUE"
#endif
Expand Down