Skip to content

Servo library should use peripheral clock frequency (80MHz) instead of F_CPU #1789

Closed
@mytrain

Description

@mytrain

When running the following timer1 configuration, 'timerTick' is still invoked with a period of 50 us whatever the CPU frequency 160Mz or 80Mhz
timer1_isr_init();
timer1_attachInterrupt(timerTick);
timer1_enable(TIM_DIV16, TIM_EDGE, TIM_LOOP);
timer1_write(250);

I assumed that CPU frequency is changed correctly in the IDE as clockCyclesPerMicrosecond() returns 80 (for 80Mhz) or 160 (for 160Mhz).

As consequence (not tested by myself) ServoTimer.h code should not work properly in case of 160Mhz setup.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions