Skip to content

Commit 2748072

Browse files
authored
Merge branch 'stm32duino:main' into main
2 parents 9662a59 + f67f03b commit 2748072

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

Diff for: libraries/Servo/src/stm32/Servo.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,12 @@ uint8_t Servo::attach(int pin, int min, int max, int value)
121121
if (this->servoIndex < MAX_SERVOS) {
122122
pinMode(pin, OUTPUT); // set servo pin to output
123123
servos[this->servoIndex].Pin.nbr = pin;
124-
write(value);
125124
// todo min/max check: abs(min - MIN_PULSE_WIDTH) /4 < 128
126125
this->min = (MIN_PULSE_WIDTH - min) / 4; //resolution of min/max is 4 uS
127126
this->max = (MAX_PULSE_WIDTH - max) / 4;
127+
128+
write(value); // set the initial position
129+
128130
// initialize the timer if it has not already been initialized
129131
if (isTimerActive() == false) {
130132
TimerServoInit();

Diff for: libraries/SrcWrapper/src/stm32/analog.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,11 @@ void dac_write_value(PinName pin, uint32_t value, uint8_t do_init)
409409
}
410410

411411
dacChannelConf.DAC_Trigger = DAC_TRIGGER_NONE;
412+
#if defined(DISABLE_DAC_OUTPUTBUFFER)
413+
dacChannelConf.DAC_OutputBuffer = DAC_OUTPUTBUFFER_DISABLE;
414+
#else
412415
dacChannelConf.DAC_OutputBuffer = DAC_OUTPUTBUFFER_ENABLE;
416+
#endif
413417
#if defined(DAC_OUTPUTSWITCH_ENABLE)
414418
dacChannelConf.DAC_OutputSwitch = DAC_OUTPUTSWITCH_ENABLE;
415419
#endif

Diff for: platform.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ compiler.optimization_flags={build.flags.optimize} {build.flags.debug}
2323
compiler.optimization_flags.release={build.flags.optimize} {build.flags.debug}
2424
compiler.optimization_flags.debug=-Og -g
2525

26-
compiler.path={runtime.tools.xpack-arm-none-eabi-gcc-12.2.1-1.2.path}/bin/
26+
compiler.path={runtime.tools.xpack-arm-none-eabi-gcc-13.2.1-1.1.path}/bin/
2727

2828
compiler.S.cmd=arm-none-eabi-gcc
2929
compiler.c.cmd=arm-none-eabi-gcc
@@ -232,6 +232,6 @@ debug.toolchain=gcc
232232
debug.toolchain.path={compiler.path}
233233
debug.toolchain.prefix=arm-none-eabi-
234234
debug.server=openocd
235-
debug.server.openocd.path={runtime.tools.xpack-openocd-0.12.0-1.path}/bin/openocd
236-
debug.server.openocd.scripts_dir={runtime.tools.xpack-openocd-0.12.0-1.path}/openocd/scripts
235+
debug.server.openocd.path={runtime.tools.xpack-openocd-0.12.0-2.path}/bin/openocd
236+
debug.server.openocd.scripts_dir={runtime.tools.xpack-openocd-0.12.0-2.path}/openocd/scripts
237237
debug.server.openocd.script={build.path}/openocd.cfg

Diff for: system/STM32MP1xx/system_stm32mp1xx.c

+11-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* be used by the user application to setup
1515
* the SysTick timer or configure other
1616
* parameters.
17-
*
17+
*
1818
* - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
1919
* be called whenever the core clock is changed
2020
* during program execution.
@@ -73,8 +73,10 @@
7373
/*!< Uncomment the following line if you need to relocate your vector Table in
7474
Internal SRAM. */
7575
/* #define VECT_TAB_SRAM */
76-
#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
76+
#ifndef VECT_TAB_OFFSET
77+
#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
7778
This value must be a multiple of 0x400. */
79+
#endif
7880
/******************************************************************************/
7981

8082
/**
@@ -109,8 +111,8 @@
109111
* @{
110112
*/
111113

112-
#if defined (DATA_IN_ExtSRAM)
113-
static void SystemInit_ExtMemCtl(void);
114+
#if defined (DATA_IN_ExtSRAM)
115+
static void SystemInit_ExtMemCtl(void);
114116
#endif /* DATA_IN_ExtSRAM */
115117

116118
/**
@@ -123,7 +125,7 @@
123125

124126
/**
125127
* @brief Setup the microcontroller system
126-
* Initialize the FPU setting, vector table location and External memory
128+
* Initialize the FPU setting, vector table location and External memory
127129
* configuration.
128130
* @param None
129131
* @retval None
@@ -149,7 +151,7 @@ void SystemInit (void)
149151
CLEAR_REG(EXTI_C2->EMR3);
150152
#else
151153
#error Please #define CORE_CM4
152-
#endif
154+
#endif
153155
}
154156

155157
/**
@@ -163,7 +165,7 @@ void SystemInit (void)
163165
* based on this variable will be incorrect.
164166
*
165167
* @note - The system frequency computed by this function is not the real
166-
* frequency in the chip. It is calculated based on the predefined
168+
* frequency in the chip. It is calculated based on the predefined
167169
* constant and the selected clock source:
168170
*
169171
* - If SYSCLK source is HSI, SystemCoreClock will contain the
@@ -269,10 +271,10 @@ void SystemCoreClockUpdate (void)
269271
*/
270272
void SystemInit_ExtMemCtl(void)
271273
{
272-
274+
273275
}
274276
#endif /* DATA_IN_ExtSRAM */
275-
277+
276278
/**
277279
* @}
278280
*/

0 commit comments

Comments
 (0)