Giter Club home page Giter Club logo

Comments (4)

IRISZZW avatar IRISZZW commented on June 15, 2024

iotdk board has a 6 channel pwm_timer module, related code in:
board/iotdk/drivers/ip/designware/pwm_timer
device/ip/designware/pwm_timer
device/ip/ip_hal/inc

from embarc_osp.

ericwu13 avatar ericwu13 commented on June 15, 2024

May I ask about its highest possible PWM clock output rate? Thanks!

from embarc_osp.

IRISZZW avatar IRISZZW commented on June 15, 2024
int main(void)
{

	io_arduino_config(ARDUINO_PIN_3, ARDUINO_PWM, IO_PINMUX_ENABLE);//pwm timer ch0
	DEV_PWM_TIMER_CFG ch0_pwm_cfg;
	ch0_pwm_cfg.mode = DEV_PWM_TIMER_MODE_PWM;
	ch0_pwm_cfg.count_high = 500;
	ch0_pwm_cfg.count_low = 500;
	ch0_pwm_cfg.isr_hander = NULL;
	DEV_PWM_TIMER_PTR pwm_timer_test = pwm_timer_get_dev(DW_PWM_TIMER_0_ID);
	pwm_timer_test->pwm_timer_open();
	pwm_timer_test->pwm_timer_control(0, PWM_TIMER_CMD_SET_CFG, (void *)(&ch0_pwm_cfg));
	while(1);
}

you can do some test. the clock of pwm is 144 MHz
output rate = 144MHz / (count_high + count_low)
duty = count_high / (count_high + count_low)

then number of count_high and count_low should not be to small.

from embarc_osp.

ericwu13 avatar ericwu13 commented on June 15, 2024

thanks! I can use PWM now. really appreciate your help.

from embarc_osp.

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.