Skip to content

Lower STM32L432 SPI clock to spec - #3493

Merged
pkendall64 merged 2 commits into
ExpressLRS:3.x.x-maintenancefrom
hydra:stm32-fixes-1
Jan 16, 2026
Merged

pkendall64 merged 2 commits into
ExpressLRS:3.x.x-maintenancefrom
hydra:stm32-fixes-1

Conversation

@hydra

@hydra hydra commented Jan 11, 2026

Copy link
Copy Markdown
Contributor
  1. Uart debug comms was using the default uart pins.

The 'DIY_2400_RX_STM32_CCG_Nano_v0.5' uses non-default UART pins.

  1. SX1280 clock speed calculation assumed system clock of 72Mhz, L432 runs at 80Mhz.
  2. Comms errors observed at 20Mhz on L432.

at 20Mhz, I get:

Read Vers sx1280 #1: 65023

at 1.25Mhz (DIV64) I get:

Read Vers sx1280 #1: 43447

at 10Mhz (DIV8) I get:

Read Vers sx1280 #1: 43447

And yes, I did remove scope probes for the 10 and 20Mhz tests, and yes and kept the breadboard and module wires as short as I could.

image

@pkendall64 pkendall64 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You do realise that STM32 has been removed in the master line. So not being supported in V4 and above

@pkendall64 pkendall64 added enhancement 🪄 New feature or request V3.6 👂 labels Jan 12, 2026
@hydra

hydra commented Jan 12, 2026

Copy link
Copy Markdown
Contributor Author

You do realise that STM32 has been removed in the master line. So not being supported in V4 and above

I do indeed realize this, and my daily driver IRC Ghost TX is very very sad. 😢

@CapnBry

CapnBry commented Jan 12, 2026

Copy link
Copy Markdown
Member

Yeah I do not think we should be wasting our time reviewing STM32 changes.

There's a lot of complexity with the DEBUG_LOG and what pins it should be on and I definitely don't want to unwind all that to review this.

What about you take out the DEBUG part and we can consider just the SPI clock change?

@CapnBry CapnBry changed the title STM32 fixes Lower STM32L432 SPI clock to spec Jan 12, 2026
hydra added 2 commits January 15, 2026 09:44
* old code said: `DIV4`, but comment read `72 / 8 = 9Mhz`, but using DIV4 would mean a frequency of 18Mhz (72 / 4).
* L432 has a higher system clock (80Mhz) than what was in use when the comment was written (probably F1 @ 72Mhz), so the resulting frequency is 20Mhz on the L4.
* communication error failures were observed at 20Mhz, which is out-of-spec.
@hydra

hydra commented Jan 15, 2026

Copy link
Copy Markdown
Contributor Author

What about you take out the DEBUG part and we can consider just the SPI clock change?

Sure, one commit removed.

@pkendall64
pkendall64 merged commit 06c491d into ExpressLRS:3.x.x-maintenance Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 🪄 New feature or request V3.6 👂

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants