Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: CC2540 problem with PWM on Timer4.

$
0
0

I started once again, and now everything is all right.

My new code:

  osal_pwrmgr_device( PWRMGR_ALWAYS_ON );  
    PERCFG = 0x00;      //TIMER4 ALTERNATIVE LOCATION 1
    P1DIR |=0x02;       // Timer 4 Alternate location 1
    P1SEL |= 0x02;      // Peripheral function on P1_1
    P2SEL |= 0x10;      //timer4 over timer1
    T4CC0 = 0x5F;       //PWM period
    T4CC1 = 0x06;
    T4CCTL1 = 0x16;     //reset   Disable channel 1 interrupts
    T4CTL=0x37;         //Prescaler on 2, Clear counter UP/DOWN Mode
    T4CTL=0x33;         //Clear = 0


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>