Hi all, I´m trying to get PWM signal using cc2530 (SmartRF 05 EB 1.8.1), in other project I did it, but in this project i´m using UART signals to get the value that will generate PWM signal, I´m not sure if the pwm signal is blocked by UART configuration. My configuration is:
T1CTL = 0x02; // Para el controlador
T1CCTL0 = 0x24;
T1CCTL1 = 0x24;
T1CC0H = 0x7; // Máximo conteo con 12 bits del ADC. Periodo de PWM 64us
T1CC0L = 0xFF;
T1CC1L = 0; // Genera la Acción de control a través del PWM
T1CC1H = 0;
PERCFG = 0x40; // Timer 1 saliendo por P1, UART 0 por el P0
U0GCR = 0X08; // Configura los temporizadores para una comunicación a
U0BAUD = 59; // 9600 baudios, con un reloj de 32 MHz
U0CSR = 0XC0; // Configura UART0, habilita la recepción
U0UCR = 0X02; // Configura: sin control de flujo, dato de 8 bits, sin
P0SEL = 0XFF; // P0 función periférico
P0DIR = 0x6F; // b4 y b7 como entradas análogas
ADCCFG = 0X90; // Habilita las entradas análogas 4 y 7
P1SEL = 0X0F; // P1 parte baja en función periférico, ME QUEDO SIN LOS LEDs
P1DIR = 0XF0; // Parte alta de salida
IEN0 = 0X8C; // Habilita las interrupciones de recepción de las 2 UART
// Configuración de los pines del ADC y del Timer 1
HAL_ENABLE_INTERRUPTS();
and then, I activate PWM using this:
T1CC1L = (uint8)(valED >> 8); // Genera la Acción de control a través del PWM, puerto p18, pin 11
T1CC1H = (uint8)valED ;
// ValED has the value of UART