embassy-rs / stm32-data

75 stars 105 forks source link

Add DSIHOST support #468

Closed JuliDi closed 5 months ago

JuliDi commented 5 months ago

This PR adds support for DSIHOST to stm32-data.

The yaml files were generated by using ./d extract-all DSI and ./d extract-all DSIHOST, which seems to have caught everything. This resulted in YAML files for:

Comparing the YAML files showed:

There seem to be 3 different IP versions (Cube and SHARK_Cube appear to have no differences):

Accordingly, we have added dsihost_v1.yaml, dsihost_v2.yaml and dsihost_u5.yaml. However, so far only dsihost_v1.yaml is somewhat verified (having an STM32F469 DK at hand). The V2 is only used in the STM32MP157, for which embassy does not yet have support. But it probably does not hurt to have it in there already.

In perimap, the YAML files are now mapped like this, which seems to work fine:

(".*:DSIHOST:dsihost1_v1_0", ("dsihost", "v1", "DSIHOST")),
(".*:DSIHOST:dsihost1_v1_0_SHARK", ("dsihost", "v1", "DSIHOST")),
(".*:DSIHOST:dsihost1_v2_0", ("dsihost", "v2", "DSIHOST")),
(".*:DSIHOST:dsihost_U5", ("dsihost", "u5", "DSIHOST")),

Some minor changes to header.rs and rcc.rs to fix mixed use of DSI and DSIHOST were necessary.

We have decided to name the peripheral DSIHOST because this appears more often in the XML files and the "official" name in the Reference Manuals is "DSI Host" as well.

A PR to embassy that fixes issues with the RCC clock setup introduced with this PR (fix has been discussed in the chat) will follow shortly. If possible, this PR could be merged first such that the embassy PR can reference this metapac build already.

embassy-ci[bot] commented 5 months ago

diff: https://ci.embassy.dev/jobs/bcac962039e7/artifacts/diff.html