iLLD_TC27xC
1.0
|
![]() |
FCE gives CRC-x(x= 8,16,32) message signatures. Kernel 3 is used for CRC-8,Kernel 2 is used for CRC-16,Kernel 0 1nd Kernel 1 is used for CRC-32.
In the following sections it will be described, how to integrate the driver into the application framework.
Include following header file into your C code:
Declare the FCE and CRC handles as global variable in your C code:
See also How to define Interrupts?
Define priorities for the Interrrupt handler. This is normally done in the Ifx_IntPrioDef.h file:
Add the interrupt service routine to your C code which should do the error flag handling:
Finally install the interrupt handler in your initialisation function:
The module initialisation can be done in the same function. Here an example for all CRC kernels:
Now, all 4 FCE kernels are configured and can be used to calculate CRC values.
In following examples, CRC is calculated over following array:
Function calls:
By default, all error interrupts aside from the CRC mismatch interrupt (CMF) are enabled.
In order to use the CMF interrupt as well, the appr. error flag has to be enabled during configuration:
And the expected CRC value has to be written into the expectedCrc field of the handle before the CRC calculation is started.