EasyManuals Logo

ST SPC560P34 User Manual

ST SPC560P34
936 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #565 background imageLoading...
Page #565 background image
RM0046 FlexCAN
Doc ID 16912 Rev 5 565/936
If the CPU writes the abort code before the transmission begins internally, then the write
operation is not blocked, therefore the MB is updated and no interrupt flag is set. In this way
the CPU just needs to read the abort code to make sure the active MB was deactivated.
Although the AEN bit is asserted and the CPU wrote the abort code, in this case the MB is
deactivated and not aborted, because the transmission did not start yet. One MB is only
aborted when the abort request is captured and kept pending until one of the previous
conditions are satisfied.
The abort procedure can be summarized as follows:
1. CPU writes 1001 into the code field of the C/S word.
2. CPU reads the CODE field and compares it to the value that was written.
3. If the CODE field that was read is different from the value that was written, the CPU
must read the corresponding IFLAG to check if the frame was transmitted or it is being
currently transmitted. If the corresponding IFLAG is set, the frame was transmitted. If
the corresponding IFLAG is reset, the CPU must wait for it to be set, and then the CPU
must read the CODE field to check if the MB was aborted (CODE = 1001) or it was
transmitted (CODE = 1000).
Message Buffer deactivation
Deactivation is mechanism provided to maintain data coherence when the CPU writes to the
Control and Status word of active MBs out of Freeze Mode. Any CPU write access to the
Control and Status word of an MB causes that MB to be excluded from the transmit or
receive processes during the current matching or arbitration round. The deactivation is
temporary, affecting only for the current match/arbitration round.
The purpose of deactivation is data coherency. The match/arbitration process scans the
MBs to decide which MB to transmit or receive. If the CPU updates the MB in the middle of
a match or arbitration process, the data of that MB may no longer be coherent, therefore
deactivation of that MB is done.
Even with the coherence mechanism described above, writing to the Control and Status
word of active MBs when not in Freeze Mode may produce undesirable results. Examples
are:
â—Ź Matching and arbitration are one-pass processes. If MBs are deactivated after they are
scanned, no re-evaluation is done to determine a new match/winner. If an Rx MB with a
matching ID is deactivated during the matching process after it was scanned, then this
MB is marked as invalid to receive the frame, and FlexCAN will keep looking for another
matching MB within the ones it has not scanned yet. If it can not find one, then the
message will be lost. Suppose, for example, that two MBs have a matching ID to a
received frame, and the user deactivated the first matching MB after FlexCAN has
scanned the second. The received frame will be lost even if the second matching MB
was “free to receive”.
â—Ź If a Tx MB containing the lowest ID is deactivated after FlexCAN has scanned it, then
FlexCAN will look for another winner within the MBs that it has not scanned yet.
Therefore, it may transmit an MB with ID that may not be the lowest at the time because
a lower ID might be present in one of the MBs that it had already scanned before the
deactivation.
â—Ź There is a point in time until which the deactivation of a Tx MB causes it not to be
transmitted (end of move-out). After this point, it is transmitted but no interrupt is issued
and the Code field is not updated. In order to avoid this situation, the abort procedures
described in Section , “Transmission abort mechanism should be used.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST SPC560P34 and is the answer not in the manual?

ST SPC560P34 Specifications

General IconGeneral
BrandST
ModelSPC560P34
CategoryMicrocontrollers
LanguageEnglish

Related product manuals