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

PIN_CAPABILITY_ANALOG = PWM : Comportement bloquant sur certaines pins #102

Open
jnthbdn opened this issue Jun 24, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@jnthbdn
Copy link
Contributor

jnthbdn commented Jun 24, 2024

Dans le fonctionnement actuel, de codal et de STM32Pin, lorsqu'une pin est définit comme étant analogique (PIN_CAPABILITY_ANALOG) (et/ou numérique PIN_CAPABILITY_AD ou PIN_CAPABILITY_ALL, cela revient au même), elle est considéré comme étant capable de faire du PWM en plus d'une lecture analogique. Hors d'une part ce n'est pas toujours le cas, certaines pins ont un ADC mais pas de timer (et inversement), mais d'autre part ce n'est pas un comportement souhaitable.

Par exemple la pin PA_5 (pad 1 du connecteur micro:bit de la STeaMi) a un ADC (ADC1_Ch10) en plus d'être relié au TIM2. Or, le TIM2 est utilisé par codal, ainsi lors de l'initialisation de cette pin la configuration du timer est modifiée, et la STeaMi devient extrêmement lente et inutilisable...

Plusieurs solutions sont envisageables:

  • Modifier la classe STM32Pin
  • Modifier codal-core
  • ...
@jnthbdn jnthbdn added the bug Something isn't working label Jun 24, 2024
@jnthbdn jnthbdn changed the title PIN_CAPABILITY_ANALOG vs. PWM PIN_CAPABILITY_ANALOG = PWM : Comportement bloquant sur certaines pin Jun 24, 2024
@jnthbdn jnthbdn changed the title PIN_CAPABILITY_ANALOG = PWM : Comportement bloquant sur certaines pin PIN_CAPABILITY_ANALOG = PWM : Comportement bloquant sur certaines pins Jun 24, 2024
jnthbdn added a commit to letssteam/codal-stm32-STEAM32_WB55RG that referenced this issue Jul 2, 2024
jnthbdn added a commit to letssteam/codal-stm32-STEAM32_WB55RG that referenced this issue Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant