DM8168 PWM driver (register settings)

Source: Internet
Author: User

The PWM of DM8168 is output through the TIMx_OUT pin. You need to configure Timer for Waveform output.

① Configure the Timer clock to ensure that the Timer can work normally.

② Disable Timer before setting the register.

③ Set the load value after timed overflow.

④ Set the comparison value, which determines the PWM duty cycle.

⑤ Set the internal counter value.

6. Start Timer.

After starting DM8168, stop at the U-boot interface and use the U-boot memory read/write tool for debugging.

1. Modify CM_ALWON_TIMER_4_CLKCTRL. The register information is as follows:


Is the control register for Timer4 CLOCK. Details:


To enable Timer4 to work properly, set CM_ALWON_TIMER_4_CLKCTRL to 0x00000002, and its default power-on value is 0x00030000.

Run the U-boot command:

TI8168_EVM # mw. l 0x4818157C 0x00000002 complete settings

Ii. Disable Timer

0x48044038 "TCLR | Timer Control

Run the U-boot command:

TI8168_EVM # mw. l 0x48044038 0

3. The following table shows different output waveforms with different settings.


We chose the second to last option (TRG = 10 & PT = 1). Once a load value and comparison value are set, the duty cycle and cycle can be determined.

Set the load value:

TI8168_EVM # mw. l 0x48044040 0xffffffe0
<喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + y8shosno1soxyl3pjimymdu0mdujuw.vcd4kpha + 5E + cda-vcd4kpha + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20140612/20140612091650167.jpg" alt = "">

PT = 1 select the flip mode, TRG = 2 so that the output port is flipped when overflow and matching, so that there is a continuous PWM.

5. Set internal counter to be consistent with the load value:

TI8168_EVM # mw. l 0x48020.3c 0xffffffe0

6. Start:

TI8168_EVM # mw. l 0x48044038 0x1843

0x1843 is the value of the TCLR Control Register, which includes the PT and TRG settings. For details, refer to the Big Data Manual of more than two thousand pages.

7. After the test is successful, you can directly change the comparison value to change the duty cycle when Timer is running, for example:

TI8168_EVM # mw. l 0x48020.4c 0xfffffff5



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.