fix: correct 14.5 MHz to 12 MHz across all CBM projects

- Update all docstrings from 14.5 MHz to 12 MHz XOSC (29 files)
- Fix 0x05_servo_cbm divider: INT=14/FRAC=8 (14.5) -> INT=12/FRAC=0 (12)
- Verified against RP2350 datasheet, Pico 2 board schematic, and SDK
This commit is contained in:
Kevin Thomas
2026-04-05 18:19:43 -04:00
parent 99ed43d69f
commit 6bb722ddee
29 changed files with 40 additions and 41 deletions

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver header for RP2350.
*
* Bare-metal UART0 driver supporting TX/RX on GPIO 0/1 at
* 115200 baud (14.5 MHz XOSC clock).
* 115200 baud (12 MHz XOSC clock).
*
******************************************************************************
* @attention

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver implementation for RP2350.
*
* Configures UART0 on GPIO 0 (TX) and GPIO 1 (RX) at 115200
* baud using the 14.5 MHz XOSC clock.
* baud using the 12 MHz XOSC clock.
*
******************************************************************************
* @attention
@@ -59,7 +59,7 @@ static void _uart_configure_pins(void)
}
/**
* @brief Set UART0 baud rate divisors for 115200 at 14.5 MHz.
* @brief Set UART0 baud rate divisors for 115200 at 12 MHz.
* @retval None
*/
static void _uart_set_baud(void)

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver header for RP2350.
*
* Millisecond busy-wait delay calibrated for a 14.5 MHz clock.
* Millisecond busy-wait delay calibrated for a 12 MHz clock.
*
******************************************************************************
* @attention

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver header for RP2350.
*
* Bare-metal UART0 driver supporting TX/RX on GPIO 0/1 at
* 115200 baud (14.5 MHz XOSC clock).
* 115200 baud (12 MHz XOSC clock).
*
******************************************************************************
* @attention

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver implementation for RP2350.
*
* Busy-wait millisecond delay calibrated for a 14.5 MHz clock
* Busy-wait millisecond delay calibrated for a 12 MHz clock
* (3600 loop iterations per millisecond).
*
******************************************************************************

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver implementation for RP2350.
*
* Configures UART0 on GPIO 0 (TX) and GPIO 1 (RX) at 115200
* baud using the 14.5 MHz XOSC clock.
* baud using the 12 MHz XOSC clock.
*
******************************************************************************
* @attention
@@ -59,7 +59,7 @@ static void _uart_configure_pins(void)
}
/**
* @brief Set UART0 baud rate divisors for 115200 at 14.5 MHz.
* @brief Set UART0 baud rate divisors for 115200 at 12 MHz.
* @retval None
*/
static void _uart_set_baud(void)

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver header for RP2350.
*
* Millisecond busy-wait delay calibrated for a 14.5 MHz clock.
* Millisecond busy-wait delay calibrated for a 12 MHz clock.
*
******************************************************************************
* @attention

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver header for RP2350.
*
* Bare-metal UART0 driver supporting TX/RX on GPIO 0/1 at
* 115200 baud (14.5 MHz XOSC clock).
* 115200 baud (12 MHz XOSC clock).
*
******************************************************************************
* @attention

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver implementation for RP2350.
*
* Busy-wait millisecond delay calibrated for a 14.5 MHz clock
* Busy-wait millisecond delay calibrated for a 12 MHz clock
* (3600 loop iterations per millisecond).
*
******************************************************************************

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver implementation for RP2350.
*
* Configures UART0 on GPIO 0 (TX) and GPIO 1 (RX) at 115200
* baud using the 14.5 MHz XOSC clock.
* baud using the 12 MHz XOSC clock.
*
******************************************************************************
* @attention
@@ -59,7 +59,7 @@ static void _uart_configure_pins(void)
}
/**
* @brief Set UART0 baud rate divisors for 115200 at 14.5 MHz.
* @brief Set UART0 baud rate divisors for 115200 at 12 MHz.
* @retval None
*/
static void _uart_set_baud(void)

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver header for RP2350.
*
* Millisecond busy-wait delay calibrated for a 14.5 MHz clock.
* Millisecond busy-wait delay calibrated for a 12 MHz clock.
*
******************************************************************************
* @attention

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver header for RP2350.
*
* Bare-metal UART0 driver supporting TX/RX on GPIO 0/1 at
* 115200 baud (14.5 MHz XOSC clock).
* 115200 baud (12 MHz XOSC clock).
*
******************************************************************************
* @attention

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver implementation for RP2350.
*
* Busy-wait millisecond delay calibrated for a 14.5 MHz clock
* Busy-wait millisecond delay calibrated for a 12 MHz clock
* (3600 loop iterations per millisecond).
*
******************************************************************************

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver implementation for RP2350.
*
* Configures UART0 on GPIO 0 (TX) and GPIO 1 (RX) at 115200
* baud using the 14.5 MHz XOSC clock.
* baud using the 12 MHz XOSC clock.
*
******************************************************************************
* @attention
@@ -59,7 +59,7 @@ static void _uart_configure_pins(void)
}
/**
* @brief Set UART0 baud rate divisors for 115200 at 14.5 MHz.
* @brief Set UART0 baud rate divisors for 115200 at 12 MHz.
* @retval None
*/
static void _uart_set_baud(void)

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver header for RP2350.
*
* Millisecond busy-wait delay calibrated for a 14.5 MHz clock.
* Millisecond busy-wait delay calibrated for a 12 MHz clock.
*
******************************************************************************
* @attention

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver header for RP2350.
*
* Bare-metal UART0 driver supporting TX/RX on GPIO 0/1 at
* 115200 baud (14.5 MHz XOSC clock).
* 115200 baud (12 MHz XOSC clock).
*
******************************************************************************
* @attention

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver implementation for RP2350.
*
* Busy-wait millisecond delay calibrated for a 14.5 MHz clock
* Busy-wait millisecond delay calibrated for a 12 MHz clock
* (3600 loop iterations per millisecond).
*
******************************************************************************

View File

@@ -6,8 +6,7 @@
*
* Configures PWM slice 3, channel A on GPIO 6 at 50 Hz for
* standard hobby servo control. Uses a wrap of 19999 and a
* fractional clock divider of 14.5 (14.5 MHz XOSC / 50 Hz /
* 20000 = 14.5).
* clock divider of 12 (12 MHz XOSC / 50 Hz / 20000 = 12).
*
******************************************************************************
* @attention
@@ -32,14 +31,14 @@
#define SERVO_SLICE 3U
/**
* @brief Wrap value for 50 Hz at 14.5 MHz with divider 14.5.
* @brief Wrap value for 50 Hz at 12 MHz with divider 12.
*/
#define SERVO_WRAP 19999U
/**
* @brief Clock divider register value for 14.5 (INT=14, FRAC=8).
* @brief Clock divider register value for 12 (INT=12, FRAC=0).
*/
#define SERVO_DIV_VAL ((14U << PWM_DIV_INT_SHIFT) | 8U)
#define SERVO_DIV_VAL ((12U << PWM_DIV_INT_SHIFT) | 0U)
/**
* @brief Minimum pulse width in microseconds (0 degrees).

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver implementation for RP2350.
*
* Configures UART0 on GPIO 0 (TX) and GPIO 1 (RX) at 115200
* baud using the 14.5 MHz XOSC clock.
* baud using the 12 MHz XOSC clock.
*
******************************************************************************
* @attention
@@ -59,7 +59,7 @@ static void _uart_configure_pins(void)
}
/**
* @brief Set UART0 baud rate divisors for 115200 at 14.5 MHz.
* @brief Set UART0 baud rate divisors for 115200 at 12 MHz.
* @retval None
*/
static void _uart_set_baud(void)

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver header for RP2350.
*
* Millisecond busy-wait delay calibrated for a 14.5 MHz clock.
* Millisecond busy-wait delay calibrated for a 12 MHz clock.
*
******************************************************************************
* @attention

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver header for RP2350.
*
* Bare-metal UART0 driver supporting TX/RX on GPIO 0/1 at
* 115200 baud (14.5 MHz XOSC clock).
* 115200 baud (12 MHz XOSC clock).
*
******************************************************************************
* @attention

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver implementation for RP2350.
*
* Busy-wait millisecond delay calibrated for a 14.5 MHz clock
* Busy-wait millisecond delay calibrated for a 12 MHz clock
* (3600 loop iterations per millisecond).
*
******************************************************************************

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver implementation for RP2350.
*
* Configures UART0 on GPIO 0 (TX) and GPIO 1 (RX) at 115200
* baud using the 14.5 MHz XOSC clock.
* baud using the 12 MHz XOSC clock.
*
******************************************************************************
* @attention
@@ -59,7 +59,7 @@ static void _uart_configure_pins(void)
}
/**
* @brief Set UART0 baud rate divisors for 115200 at 14.5 MHz.
* @brief Set UART0 baud rate divisors for 115200 at 12 MHz.
* @retval None
*/
static void _uart_set_baud(void)

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver header for RP2350.
*
* Millisecond busy-wait delay calibrated for a 14.5 MHz clock.
* Millisecond busy-wait delay calibrated for a 12 MHz clock.
*
******************************************************************************
* @attention

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver header for RP2350.
*
* Bare-metal UART0 driver supporting TX/RX on GPIO 0/1 at
* 115200 baud (14.5 MHz XOSC clock).
* 115200 baud (12 MHz XOSC clock).
*
******************************************************************************
* @attention

View File

@@ -4,7 +4,7 @@
* @author Kevin Thomas
* @brief Delay driver implementation for RP2350.
*
* Busy-wait millisecond delay calibrated for a 14.5 MHz clock
* Busy-wait millisecond delay calibrated for a 12 MHz clock
* (3600 loop iterations per millisecond).
*
******************************************************************************

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver implementation for RP2350.
*
* Configures UART0 on GPIO 0 (TX) and GPIO 1 (RX) at 115200
* baud using the 14.5 MHz XOSC clock.
* baud using the 12 MHz XOSC clock.
*
******************************************************************************
* @attention
@@ -59,7 +59,7 @@ static void _uart_configure_pins(void)
}
/**
* @brief Set UART0 baud rate divisors for 115200 at 14.5 MHz.
* @brief Set UART0 baud rate divisors for 115200 at 12 MHz.
* @retval None
*/
static void _uart_set_baud(void)

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver header for RP2350.
*
* Bare-metal UART0 driver supporting TX/RX on GPIO 0/1 at
* 115200 baud (14.5 MHz XOSC clock).
* 115200 baud (12 MHz XOSC clock).
*
******************************************************************************
* @attention

View File

@@ -5,7 +5,7 @@
* @brief UART0 driver implementation for RP2350.
*
* Configures UART0 on GPIO 0 (TX) and GPIO 1 (RX) at 115200
* baud using the 14.5 MHz XOSC clock.
* baud using the 12 MHz XOSC clock.
*
******************************************************************************
* @attention
@@ -59,7 +59,7 @@ static void _uart_configure_pins(void)
}
/**
* @brief Set UART0 baud rate divisors for 115200 at 14.5 MHz.
* @brief Set UART0 baud rate divisors for 115200 at 12 MHz.
* @retval None
*/
static void _uart_set_baud(void)