EasyManua.ls Logo

TELINK SEMICONDUCTOR TLSR8232 - Set DMA FIFO Buffer; Start and Stop of IR DMA FIFO Mode; IR Demo; PWM Mode Selection

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 181 Ver.1.0.0
The “pulse_num” specifies the number of Signal Frames for current PWM waveform.
The “pulse” supports two definitions below:
Typedef enum{
PWM0_PULSE_NORMAL = 0,
PWM0_PULSE_SHADOW = BIT(14),
}Pwm0Pulse_SelectDef;
When “pulse” is PWM0_PULSE_NORMAL, Signal Frame uses the configuration of
the API “pwm_set_cycle_and_duty”.
When “pulse” is PWM0_PULSE_SHADOW, Signal Frame uses the configuration of
PWM shadow mode.
PWM shadow mode enables more flexibility for PWM waveform configuration in IR
DMA FIFO mode. Related API is shown as below, and its configuration is consistent
with pwm_set_cycle_and_duty.
Void pwm_set_pwm0_shadow_cycle_and_duty(unsigned short cycle_tick,
unsigned short cmp_tick);
10.1.10.2 Set DMA FIFO Buffer
After DMA FIFO buffer is configured, call the API below to set the starting address of the
buffer to DMA module.
Void pwm_set_dma_address(void * pdat);
10.1.10.3 Start and Stop of IR DMA FIFO Mode
After DMA FIFO buffer is prepared, call the API below to start sending PWM waveforms.
void pwm_start_dma_ir_sending(void);
After all PWM waveforms in DMA FIFO buffer are sent, the PWM module will be stopped
automatically. The API below can be called to manually stop the PWM module in
advance.
void pwm_stop_dma_ir_sending(void);
10.2 IR Demo
Please refer to the IR demo code in SDK demo 5316_ble_remote. Set the macro
REMOTE_IR_ENABLE” in “app_config.h” to 1.
10.2.1 PWM Mode Selection
As required by IR transmission, PWM output needs to switch at specific time with small
error tolerance of switch time accuracy to avoid incorrect IR.

Table of Contents