Added field for programmed timer period to HAL timer struct.

This commit is contained in:
Terje Io
2025-11-05 07:54:32 +01:00
parent 720f6bd552
commit 69cdfb76c8
2 changed files with 21 additions and 3 deletions

View File

@@ -1,5 +1,21 @@
## grblHAL changelog
<a name="20251105">20251105
Core:
* Added field for programmed timer period to HAL timer struct.
Drivers:
* STM32F4xx: implemented accurate continuous timer mode in timer HAL API. Fix for incorrect clock tree setup for BTT Octopus Board.
Plugins:
* Spindle, stepper: changed to use continuous timer mode, when available, for accurate RPM. Ref. issue [#41](https://github.com/grblHAL/Plugins_spindle/issues/41)
---
<a name="20251023">Build 20251023
Core:
@@ -11,7 +27,7 @@ This could lead to POS failure or plugins not initializing when a large tool tab
Drivers:
* Simulator: fix for double free bug, ref. issue [#17](https://github.com/grblHAL/Simulator/issues/17) and block reporting not working.
* Simulator: fix for double free bug, ref. issue [#17](https://github.com/grblHAL/Simulator/issues/17), and block reporting not working.
Plugins:

4
hal.h
View File

@@ -76,7 +76,8 @@ typedef union {
rtc :1,
rtc_set :1,
bltouch_probe :1,
unassigned :4;
modbus_rtu :1, // Modbus RTU stream is enabled.
unassigned :3;
};
} driver_cap_t;
@@ -522,6 +523,7 @@ typedef void (*timer_irq_handler_ptr)(void *context);
typedef struct {
void *context; //!< Pointer to data to be passed on to the interrupt handlers
bool single_shot; //!< Set to true if timer is single shot
uint32_t period; //!< Current value for period register
timer_irq_handler_ptr timeout_callback; //!< Pointer to main timeout callback
uint32_t irq0; //!< Compare value for compare interrupt 0
timer_irq_handler_ptr irq0_callback; //!< Pointer to compare interrupt 0 callback