EasyManua.ls Logo

TELINK SEMICONDUCTOR TLSR8232 - Fifotask_Repeat

Default Icon
211 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1 188 Ver.1.0.0
ir_send_ctrl.sending_start_time = clock_time();
Then calculate FifoTask_idle time in the interrupt triggered by completion of
FifoTask_data:
110mS (clock_time() - ir_send_ctrl.sending_start_time)
Demo code:
u32 tick_2_repeat_sysClockTimer16M = 110*CLOCK_16M_SYS_TIMER_CLK_1MS
(clock_time() - ir_send_ctrl.sending_start_time);
u32 tick_2_repeat_sysTimer =
(tick_2_repeat_sysClockTimer16M*CLOCK_SYS_CLOCK_1US>>4);
Please pay attention to time unit switch. As introduced in Clock module, System Timer
frequency used in software timer is fixed as 16MHz. Since PWM clock is derived from
system clock, user needs to consider the case with system clock rather than 16MHz (e.g.
32MHz, 48MHz).
FifoTask_idle does not send PWM waveform, which can be considered to continually
send non-carrier signal. It can be implemented by setting the first parameter “carrier_en”
of the API pwm_config_dma_fifo_waveformto 0.
waveform_wait_to_repeat = pwm_config_dma_fifo_waveform(0,
PWM0_PULSE_NORMAL, tick_2_repeat_sysTimer/PWM_CARRIER_CYCLE_TICK);
10.2.5.3 FifoTask_repeat
As per Demo IR protocol, repeat signal is 9ms carrier signal + 2.25ms non-carrier signal.
Similar to the processing of FifoTask_data, the end of repeat signal should be followed
by 560us carrier signal as stop signal.
As introduced in IR timing design, repeat signal lasts for 110ms, so the duration of non-
carrier signal after the 560us carrier signal should be:
110mS 9mS 2.25mS 560uS = 99190uS
The code below shows the configuration for a complete repeat signal:
//repeat signal first part, 9000 us carrier, 2250 us low
waveform_repeat_1st = pwm_config_dma_fifo_waveform(1,
PWM0_PULSE_NORMAL, 9000 *
CLOCK_SYS_CLOCK_1US/PWM_CARRIER_CYCLE_TICK);
waveform_repeat_2nd = pwm_config_dma_fifo_waveform(0,
PWM0_PULSE_NORMAL, 2250 *
CLOCK_SYS_CLOCK_1US/PWM_CARRIER_CYCLE_TICK);
//repeat signal second part, 560 us carrier, 99190 us low
waveform_repeat_3rd = pwm_config_dma_fifo_waveform(1,
PWM0_PULSE_NORMAL, 560 * CLOCK_SYS_CLOCK_1US/PWM_CARRIER_CYCLE_TICK);
waveform_repeat_4th = pwm_config_dma_fifo_waveform(0,
PWM0_PULSE_NORMAL, 99190 *
CLOCK_SYS_CLOCK_1US/PWM_CARRIER_CYCLE_TICK);

Table of Contents