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

Peripheral instances with different feature sets not supported #7

Open
chris-durand opened this issue Oct 14, 2018 · 3 comments
Open

Comments

@chris-durand
Copy link
Member

I'm currently updating the I2C peripheral information. On some controllers (F0, L0) the features of the stm32-extended IP depend on the peripheral instance. I would have expected the DFG to generate multiple <driver> tags for the different instances.

Output:

     <driver name="i2c" type="stm32-extended">
        <feature value="dnf"/>
        <feature device-name="30|70" device-pin="c" value="fmp"/>
        <feature device-name="70" device-pin="r" value="fmp"/>
        <instance value="1"/>
        <instance value="2"/>
     </driver>

Expected:

     <driver name="i2c" type="stm32-extended">
       <feature value="dnf"/>
       <feature value="fmp"/>
       <instance value="1"/>
     </driver>
     <driver name="i2c" type="stm32-extended">
       <feature value="dnf"/>
       <instance value="2"/>
     </driver>
@salkinium
Copy link
Member

The merging happens on per-node basis, it has no semantic understanding of its content.
The difference is therefore kept as local as possible and doesn't propagate this to upward nodes.

The issue here is that the instance is treated as a list, and can't have any children.
I think this needs to be changed, since #1 has similar issues, where some data is scoped by instance, but can't intuitively be added as children to it.

Then you'd add common features as children to the driver node and the instance specific features to the instance.

@chris-durand
Copy link
Member Author

@salkinium Are you planning to implement that?

As a short-term solution I'll remove the features for the stm32-extended IP. We don't support fast mode plus or SMBus right now.

@salkinium
Copy link
Member

salkinium commented Oct 14, 2018

@salkinium Are you planning to implement that?

No, not in the short term. I think that would be like modm-devices v2.0, since this would most likely break the modm .lb usage. But yeah, there are a couple of things I want to add to modm-devices like BSP data (e.g. Nucleo pinouts) and common algorithms for accessing this data (like GPIO alternate function mappings). But that's future stuff.

As a short-term solution I'll remove the features for the stm32-extended IP. We don't support fast mode plus or SMBus right now.

No, leave them in. The raw information is good, just the "passing" on currently lacks.

The feature tag was intended to distinguish small, purely additive differences of the peripheral memory maps, and the protocol tag was supposed to help with selecting the approriate testing waveform for hwut (in future), but both haven't been completely thought through.
The feature tag is only used in the SPI driver at the moment.

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

No branches or pull requests

2 participants