Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract DMA remapping data for F0/F3 #548

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fwolter
Copy link

@fwolter fwolter commented Dec 15, 2024

This is the basis to fix embassy-rs/embassy#3643.

@embassy-ci
Copy link

embassy-ci bot commented Dec 15, 2024

@embassy-ci
Copy link

embassy-ci bot commented Dec 15, 2024

@Dirbaio
Copy link
Member

Dirbaio commented Jan 1, 2025

Putting a single bool in the generated data is too "ad hoc". I think the data should contain the full info of which peripheral+register+field to set to enable the remap.

Reasons:

  • The bool is specifying the value, but it's not specifying which field. This makes users (like the embassy-stm32 PR you sent) to search it by name themselves. It's nicer if the data is "as cooked as possible" so using it is easier.
  • There's more chips with "remaps" like this, for example F1 for GPIO. These are on different peripherals (AFIO) and registers (MAPR, MAPR2). The data model should ideally be the same for all chips, so remaps can be handled the same way.

For example it could be this:

{
  "signal": "ADC2",
  "channel": "DMA2_CH1",
  "remap": {
    "peripheral": "SYSCFG",
    "register": "CFGR1",
    "field": "TIM17_DMA_RMP",
    "value": 0
  }
}

@fwolter
Copy link
Author

fwolter commented Jan 2, 2025

Thank you very much for your feedback! I will incorporate it. I wasn't aware there were even more remapping bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STM32F0/F3 DMA not usable on specific channels which need remapping
2 participants