Giter Site home page Giter Site logo

Comments (5)

prachiap avatar prachiap commented on August 11, 2024

Hi Nikolay,

CC, PER Register widths are different for 8-bit/16-bit/32-bit mode in TC.
In datasheet also, we have different sections and offset given for different modes.

Do you see any discrepancy in writing to CC or PER registers?
Do you see any functional issue with period and duty cycle of the generated waveform?

Thanks,
Prachi

image

image

image

from csp.

kick2nick avatar kick2nick commented on August 11, 2024

Generated code gives me PWM with one clock positive pulse(I set 50% duty in GUI).
When I'm trying to set new value it has no effect.
Pulse duration should be set by CC1 register, but it doesn't change.(see pic. 1)
I noticed that in IO view registers CC0 CC1 have 32-bit widths(for 16-bit timer), so I tried to use 32-bit pointer and it worked.(see pic. 2)
Look at IO view: CC0 addr - 0x1C, CC1 addr -0x20. I don't see such addresses in register summary for all timers.

from csp.

prachiap avatar prachiap commented on August 11, 2024

Based on the code snippet, I believe that you are using MPWM mode to generate PWM waveform.
In MPWM waveform, CC0 decides period and CC1 decides duty cycle and output should be observed on WO[1] pin. WO[0] output is one always clock pulse irrespective of CC1 value.

Can you please let me know:

  1. Which device are you using?
  2. Are you checking WO[1] output?
  3. Is waveform frequency coming correctly?

Regards,
Prachi

from csp.

prachiap avatar prachiap commented on August 11, 2024

Hi Nikolay,

Are you able to get correct period and duty on WO[1] pin?
Please let me know if issue still persists.

Regards,
Prachi

from csp.

vishalnxt avatar vishalnxt commented on August 11, 2024

@kick2nick , I am closing the ticket as there is no update from your side. If you are still facing the issue, you can reopen the ticket and provide your observations. Thank you.

from csp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.