Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: PaulStoffregen

Search: Search took 0.03 seconds.

  1. You might also want to disable interrupts while...

    You might also want to disable interrupts while writing to multiple CTRL2 registers.
  2. Ok, I ran it here and verified the FRCEN & FORCE...

    Ok, I ran it here and verified the FRCEN & FORCE bits really do work with my oscilloscope. I added code to pulse pin 3, so I can trigger the scope on the moment it writes to those bits.

    20902

    ...
  3. Are you using an oscilloscope or logic analyzer...

    Are you using an oscilloscope or logic analyzer to view the waveforms on pins 22 or 23? Or if not directly viewing the waveforms, how will you confirm whether this works?
  4. First, consider the PWM pins you've chosen. ...

    First, consider the PWM pins you've chosen.



    int US_Tx_PIN[] = {23, 22, 14, 15};


    2 of these are on FlexPWM4, but the other 2 are on QuadTimer3, which isn't even the same type of timer!
    ...
  5. You have to start with something, even if just an...

    You have to start with something, even if just an empty program with just 1 analogWrite() line. Then we could at least see which pin number! (and we can start talking about actual registers instead...
  6. Please be specific when you need more specific...

    Please be specific when you need more specific help. Show the complete code you're already trying that isn't yet working. "Complete" means anyone where can copy it into Arduino and run it on their...
  7. Maybe you can use the FORCE bit in the submodule...

    Maybe you can use the FORCE bit in the submodule CTRL2 register? And of course write zero to the INIT register, or whatever value you want the counter to become when you write a 1 to that bit.
    ...
  8. Also, as you read the FlexPWM chapter you'll see...

    Also, as you read the FlexPWM chapter you'll see info about fractional cycle stuff. Teensy 4.0 & 4.1 do *NOT* have that feature. You can ignore all that fractional cycle info. All those fractional...
  9. In the reference manual, turn to "55.4.2.2...

    In the reference manual, turn to "55.4.2.2 Register Reload Logic" on page 3047.

    20811

    Also on the next page is a similar diagram about synchronization. The point is each group of 4 "submodule"...
  10. That will not work. You'll get the same PWM...

    That will not work. You'll get the same PWM waveforms when the hardware switches back from GPIO to timers controlling those pins.




    Yes, there are ways, but I don't believe many people would...
Results 1 to 10 of 10