Implementation
Configure the ASCLIN module
The configuration of the ASCLIN module is done by initializing an instance of the
IfxAsclin_Asc_Config
structure, which contains the following fields:
›
baudrate
– a structure that allows to set
–
baudrate
– the communication speed in bit/s
–
oversampling
– the division ratio of the baud rate for reaching higher frequencies to ensure
oversampling
›
bitTiming
– a structure that allows to set the sampling mode with
–
medianFilter
– the number of samples per bit
–
samplePointPosition
– the first sample point position
›
interrupt
– a structure that allows to set
–
txPriority
,
rxPriority
and
erPriority
– the interrupt priorities for transmission, reception and error
events
–
typeOfService
– the service provider responsible for handling the interrupt, which can be any of the
available CPUs, or the DMA
›
pins
– a structure that allows to set which port pins are used for the communication
›
rxBuffer
,
rxBufferSize
,
txBuffer
,
txBufferSize
– parameters that allow to configure the buffers that will
hold the incoming/outgoing data
The function
IfxAsclin_Asc_initModuleConfig()
fills the configuration structure with default values and
IfxAsclin_Asc_initModule()
function initializes the module with the user configuration.
Both the functions can be found in the iLLD header
IfxAsclin_Asc.h
.
5
2019-10-17
Copyright © Infineon Technologies AG 2019. All rights reserved.