5. Read the Free Running Timer. It is optional but recommended to unlock Mailbox as
soon as possible and make it available for reception.
The CPU should poll for frame reception by the status flag bit for the specific Mailbox in
one of the IFLAG Registers and not by the CODE field of that Mailbox. Polling the
CODE field does not work because once a frame was received and the CPU services the
Mailbox (by reading the C/S word followed by unlocking the Mailbox), the CODE field
will not return to EMPTY. It will remain FULL, as explained in
. If the CPU
tries to workaround this behavior by writing to the C/S word to force an EMPTY code
after reading the Mailbox without a prior safe inactivation, a newly received frame
matching the filter of that Mailbox may be lost.
CAUTION
In summary: never do polling by reading directly the C/S word
of the Mailboxes. Instead, read the IFLAG registers.
Note that the received frame's Identifier field is always stored in the matching Mailbox,
thus the contents of the ID field in an Mailbox may change if the match was due to
masking. When CAN_MCR[SRXDIS] bit is asserted, FlexCAN will not store frames
transmitted by itself in any MB, even if it contains a matching Rx Mailbox, and no
interrupt flag or interrupt signal will be generated. Otherwise, when
CAN_MCR[SRXDIS] bit is deasserted, FlexCAN can receive frames transmitted by
itself if there exists a matching Rx Mailbox.
To be able to receive CAN frames through the Rx FIFO, the CPU must enable and
configure the Rx FIFO during Freeze mode (see
Available in Rx FIFO interrupt (see the description of the BUF5I bit "Frames available in
Rx FIFO" bit in the CAN_IFLAG1 register), the CPU should service the received frame
using the following procedure:
1. Read the Control and Status word (optional: needed only if a mask was used for IDE
and RTR bits)
2. Read the ID field (optional: needed only if a mask was used)
3. Read the Data field
4. Read the CAN_RXFIR register (optional)
5. Clear the Frames Available in Rx FIFO interrupt by writing 1 to
CAN_IFLAG1[BUF5I] bit (mandatory: releases the MB and allows the CPU to read
the next Rx FIFO entry)
Functional description
Kinetis KE1xF Sub-Family Reference Manual, Rev. 4, 06/2019
1440
NXP Semiconductors
Содержание KE1xF Series
Страница 2: ...Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 2 NXP Semiconductors...
Страница 60: ...SysTick Clock Configuration Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 60 NXP Semiconductors...
Страница 114: ...Initialization application information Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 114 NXP Semiconductors...
Страница 138: ...Usage Guide Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 138 NXP Semiconductors...
Страница 320: ...Private Peripheral Bus PPB memory map Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 320 NXP Semiconductors...
Страница 342: ...Functional Description Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 342 NXP Semiconductors...
Страница 360: ...Usage Guide Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 360 NXP Semiconductors...
Страница 490: ...Interrupts Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 490 NXP Semiconductors...
Страница 550: ...Memory map and register definition Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 550 NXP Semiconductors...
Страница 562: ...Boot Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 562 NXP Semiconductors...
Страница 662: ...Power supply supervisor Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 662 NXP Semiconductors...
Страница 694: ...On chip resource access control mechanism Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 694 NXP Semiconductors...
Страница 706: ...Usage Guide Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 706 NXP Semiconductors...
Страница 724: ...Application Information Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 724 NXP Semiconductors...
Страница 736: ...Usage Guide Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 736 NXP Semiconductors...
Страница 750: ...Debug and Security Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 750 NXP Semiconductors...
Страница 798: ...Functional description Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 798 NXP Semiconductors...
Страница 808: ...Functional description Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 808 NXP Semiconductors...
Страница 866: ...Usage Guide Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 866 NXP Semiconductors...
Страница 1164: ...Usage Guide Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 1164 NXP Semiconductors...
Страница 1178: ...Usage Guide Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 1178 NXP Semiconductors...
Страница 1380: ...Usage Guide Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 1380 NXP Semiconductors...
Страница 1472: ...Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 1472 NXP Semiconductors...
Страница 1482: ...Kinetis KE1xF Sub Family Reference Manual Rev 4 06 2019 1482 NXP Semiconductors...