S3c2410pwm driver problem HELP! HELP! HELP!

Source: Internet
Author: User
S3c2410pwm driver problem HELP! HELP! HELP! -- Linux general technology-Linux programming and kernel information. The following is a detailed description. S3c2410 pwm driver problem HELP! HELP! HELP! The s3c2410 timer cannot be started, and the PWM wave does not output
The kernel I used is from linux2.6.14.1.


The initialization of the S3c2410pwm driver is as follows:

S3c2410_gpio_cfgpin (maid, FIG );
S3c2410_gpio_pullup (maid, 1 );
S3c2410_gpio_cfgpin (S3C2410_GPB3, S3C2410_GPB3_TOUT3 );
S3c2410_gpio_pullup (S3C2410_GPB3, 1 );

Writel (readl (S3C2410_TCFG1 )&(~ (0xf <20), S3C2410_TCFG1 );
Writel (readl (s3c2410_t1_0 )&(~ S3c2410_t1__prescaler0_mask), s3c2410_t1_0 );
Writel (readl (s3c2410_t1_0) | (249), s3c2410_t1_0 );
Writel (readl (S3C2410_TCFG1) | (s3c2410_t1_mux2_div8), S3C2410_TCFG1 );
Writel (readl (S3C2410_TCNTB (2 ))&(~ 0 xffff), S3C2410_TCNTB (2 ));

Writel (readl (S3C2410_TCNTB (2) | (45000), S3C2410_TCNTB (2 ));
Writel (readl (S3C2410_TCMPB (2) | (15000), S3C2410_TCMPB (2 ));
Writel (readl (S3C2410_TCNTB (3) | (55000), S3C2410_TCNTB (3 ));
Writel (readl (S3C2410_TCMPB (3) | (25000), S3C2410_TCMPB (3 ));

After the register is initialized, the value in the reread shows that the read value is correct .. However, the subfunction cannot be interrupted, and neither TOUT2 nor TOUT3 has waveform output.
The only response is
: Writel (readl (s3c2410_t1_0 )&(~ S3c2410_t1__prescaler1_mask), s3c2410_t1_0 );
Writel (readl (s3c2410_t1_0) | (20), s3c2410_t1_0 );
This speeds up the kernel timer. The cursor on the LCD runs faster.
However, other timers cannot be enabled ,,
Please give me some advice, and the request_irq function can also be successfully registered, but the interruption cannot be obtained, and it is displayed that there is a problem with the free interruption at exit,
If you reinstall this module, the system prompts that the interruption failed,

Hope you can check it out for me ..
Contact QQ: 87550691.
Related Article

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.