Figure 5-20 Data Reception Processing - Fujitsu F2MC-8FX Series User Manual

8-bit microcontroller bits pot yellow lin board
Hide thumbs Also See for F2MC-8FX Series:
Table of Contents

Advertisement

The next section explains data reception processing.
If the ID acquired using ID reception processing is for reception, the status is migrated to data
reception status, and data reception from bits pot white awaited. When a data reception interrupt is
created by bits pot white sending data, reception is processed in the reception processing function
l_ifc_rx( l_ifc_handle rx_data as shown in "Figure 5-20 Data reception processing".When data is
received as well, reception is processed using l_ifc_rx(data) each time one byte of data is received in
the same way as for the second byte onwards for data that has been sent, and when all eight bytes of
data have been received, if there is no checksum error, the reception successful flag is set, and
reception processing ends.
void
l_ifc_rx(l_ifc_handle rx_data){
switch(ucLinStatus){
case LIN_TRANSMIT:
(Omitted)
case LIN_DATA_RECEPTION:
if ( ucRxCurrentIndex >= ucRxCount ) {
if ( (uiRxCheckSum + rx_data) == 0xFF ) {
} else {
} else {
ucUartRxBuffer[ucRxCurrentIndex] = rx_data;
(Omitted)
case LIN_ID_RECEPTION:
(Omitted)
case LIN_WAKEUP_TRANSMIT:
(Omitted)
}
}
(Omitted)
flagsLinTxRx.bit.SucceedReception = SET;
memcpy( &ucUartRxFixedBuffer[0], &ucUartRxBuffer[0], ucRxCount );
(Omitted)
l_flg_tst(hCHECKSUM_ERR);

Figure 5-20 Data reception processing

107
DATA FIELD reception status
If all data has been received
If Checksum calculations are normal
Reception successful flag set
↑Copy received data
If there is a check sum error
Error processing
If there is still remaining reception data
Received data stored to buffer
AN07-00200-03E

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb95f136jbs

Table of Contents