embassy-rs / stm32-data

65 stars 92 forks source link

Add support for SAI on STM32U5 #243

Open tyler-gilbert opened 10 months ago

tyler-gilbert commented 10 months ago

This doesn't follow any of the sai_vx.yaml patterns. It is a new (and hopefully improved) SAI block.

If no one is working on this, I work on getting a PR ready.

tyler-gilbert commented 10 months ago

Correction. The STM32U5 uses the sai_v4. So no MR needed to add the yaml. I will still verify the register map matches V4 and add it to perimap.

tyler-gilbert commented 10 months ago

The datasheet has a mismatch with sai_v4:

enum/CKSTR:
  bit_size: 1
  variants:
    - name: FallingEdge
      description: Data strobing edge is falling edge of SCK
      value: 0
    - name: RisingEdge
      description: Data strobing edge is rising edge of SCK
      value: 1
ckstr

Some discussion here. The ST employee seems to confirm the datasheet is correct.