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

[Bug]: Low Frequency on PWM pins with version 3.5.0 #977

Closed
2 of 25 tasks
Pourya-3deo opened this issue Apr 18, 2024 · 4 comments
Closed
2 of 25 tasks

[Bug]: Low Frequency on PWM pins with version 3.5.0 #977

Pourya-3deo opened this issue Apr 18, 2024 · 4 comments
Assignees
Labels
bug Bug that has been reproduced

Comments

@Pourya-3deo
Copy link

Duet Forum Discussion Thread

I tried I couldn't register

Which Duet products are you using?

  • Duet2-Wifi
  • Duet2-Ethernet
  • Duet Expansion Breakout Board
  • Duex2
  • Duex5
  • Duet2-Maestro
  • Maestro Dual Driver Expansion
  • Duet3-6HC
  • Duet3-3HC
  • Duet3-1XD
  • Duet3-1LC
  • Duet3-Tool Distribution Board
  • Duet3-Mini5+
  • Duet3-Mini2+
  • Raspberry Pi or other SBC
  • SmartEffector
  • Magnetic Filament Sensor
  • Laser Filament Sensor
  • PT100 Daughterboard
  • Thermocouple Daughterboard
  • PanelDue
  • Other
  • None

Firmware Version

RRF 3.5.0

Duet Web Control Version

DWC 3.4.6

Are you using a Single Board Computer (RaspberryPi) with your Duet?

  • Yes I use a SBC.
  • No I do not use a SBC.

Please upload the results of sending M122 in the gcode console.

M122 Report
FIRMWARE_NAME: RepRapFirmware for Duet 3 MB6HC FIRMWARE_VERSION: 3.5.0 ELECTRONICS: Duet 3 MB6HC v1.02 or later FIRMWARE_DATE: 2024-04-16 09:43:06

Please upload the content of your config.g file.

Config.g

M950 P10 C"io4.out" Q10

Please upload the content of any other releveant macro files.

M42 P10 S0.2

Details specific to your printer.

Our own 3d printer

Links to additional info.

No response

What happened?

Expected result
Frequency should be 10 HZ

Observed result
Frequency was 17.88 HZ

Steps to reproduce

@Pourya-3deo Pourya-3deo added the bug Bug that has been reproduced label Apr 18, 2024
@dc42
Copy link
Collaborator

dc42 commented Apr 19, 2024

This is a known limitation, present because the timer/counter channels on the SAME70 processor are only 16 bits wide and the range of input clocks available is limited. The timer channels currently use a 150MHz clock divided by 128, so the minimum available PWM frequency is 150MHz/(128*65535) = 17.88Hz. We may be able to reduce the minimum frequency to 11.44Hz by switching to a different clock.

The PWM-capable outputs on the 6HC that are drive by timer/counter channels on the 6HC are: OUT4 OUT5 OUT8 OUT7 IO4.OUT IO5.OUT IO7.OUT

The PWM-capable outputs on the 6HC that are driven by the PWM peripheral and have a lower minimum frequency are: OUT0 OUT1 OUT2 OUT3 OUT6 OUT9

@dc42 dc42 closed this as completed Apr 19, 2024
@Pourya-3deo
Copy link
Author

Pourya-3deo commented Apr 19, 2024 via email

@dc42
Copy link
Collaborator

dc42 commented Apr 19, 2024

If you need a lower PWM frequency than 18.8Hz then use one of the outputs that is controlled by the PWM peripheral, which I listed in my reply above.

@Pourya-3deo
Copy link
Author

So I tried OUT0 and OUT9 but I don't get any accurate square shaped signal. Here is the code:
Config:
M950 P10 C"out9" Q10
Macro:
M42 P10 S0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that has been reproduced
Projects
None yet
Development

No branches or pull requests

3 participants