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

Can't get hardwaretimer alarm to fire in 3.0.x #10481

Open
1 task done
BlackysBoss opened this issue Oct 17, 2024 · 1 comment
Open
1 task done

Can't get hardwaretimer alarm to fire in 3.0.x #10481

BlackysBoss opened this issue Oct 17, 2024 · 1 comment
Assignees
Labels
Status: Awaiting triage Issue is waiting for triage

Comments

@BlackysBoss
Copy link

Board

ESP32-S2

Device Description

Lolin S2-mini

Hardware Configuration

GPIO 17 (DAC 1) attached to an amplifier.

Version

latest master (checkout manually)

IDE Name

Arduino IDE

Operating System

Windows 11

Flash frequency

No clue, can't select for this board

PSRAM enabled

yes

Upload speed

No clue, can't select for this board

Description

Tried to convert code for the timer from 2.0.17 to the new 3.0.x, but can't get it to work. Even the 'repeat' example in the timerdocs doesn't seem to work.

Sketch

fixedTimerTicks = 4000000 / sound_horn_start.sample_rate;
  
  //V2.0.17 Working
  //fixedTimer = timerBegin(1, 20, true);                        // timer 1, MWDT clock period = 12.5 ns * TIMGn_Tx_WDT_CLK_PRESCALE -> 12.5 ns * 20 -> 250 ns = 0.25 us, countUp
  //timerAttachInterrupt(fixedTimer, &fixedPlaybackTimer, true); // edge (not level) triggered
  //timerAlarmWrite(fixedTimer, fixedTimerTicks, true);          // autoreload true
  //timerAlarmEnable(fixedTimer);                                 // enable
  
  // V3.0.5 Not working, but why?
  fixedTimer = timerBegin(4000000);
  timerAttachInterrupt(fixedTimer, &fixedPlaybackTimer);
  timerAlarm(fixedTimer, fixedTimerTicks, true, 0);         // autoreload true

Debug Message

No error messages, compiles just fine

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@BlackysBoss BlackysBoss added the Status: Awaiting triage Issue is waiting for triage label Oct 17, 2024
@VojtechBartoska
Copy link
Collaborator

@P-R-O-C-H-Y Please help here with triage as well, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting triage Issue is waiting for triage
Projects
None yet
Development

No branches or pull requests

3 participants