Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

ST72561 Datasheet(PDF) 190 Page - STMicroelectronics

Part # ST72561
Description  8-BIT MCU WITH FLASH OR ROM, 10-BIT ADC, 5 TIMERS, SPI, LINSCI , ACTIVE CAN
PDF  262 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

ST72561 Datasheet(HTML) 190 Page - STMicroelectronics

Back Button ST72561 Datasheet HTML 186Page - STMicroelectronics ST72561 Datasheet HTML 187Page - STMicroelectronics ST72561 Datasheet HTML 188Page - STMicroelectronics ST72561 Datasheet HTML 189Page - STMicroelectronics ST72561 Datasheet HTML 190Page - STMicroelectronics ST72561 Datasheet HTML 191Page - STMicroelectronics ST72561 Datasheet HTML 192Page - STMicroelectronics ST72561 Datasheet HTML 193Page - STMicroelectronics ST72561 Datasheet HTML 194Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 190 / 262 page
background image
ST72561
190/262
beCAN CONTROLLER (Cont’d)
Workaround
To implement the workaround, use the following
sequence to release the CAN receive FIFO.
This sequence replaces any occurrence of
CRFR |= B_RFOM;
.
Figure 110. Workaround 1
Explanation of Workaround 1
First, we need to make sure no interrupt can occur
between the test and the release of the FIFO to
avoid any added delay.
The workaround checks if the first 2 FIFO levels
are already full (FMP = 2) as the problem happens
only in this case.
If FMP
≠2 we release the FIFO immediately, if
FMP=2, we monitor the reception status of the
cell.
The reception status is available in the CMSR reg-
ister bit 5 (REC bit). Note: The REC bit was called
RX in olders versions of the datasheet.
– If the cell is not receiving, then REC bit in CMSR
is at 0, the software can release the FIFO imme-
diately: there is no risk.
– If the cell is receiving, it is important to make sure
the release of the mailbox will not happen at the
time when the received message is loaded into
the FIFO.
We could simply wait for the end of the reception,
but this could take a long time (200µs for a 100-bit
frame at 500kHz), so we also monitor the Rx pin of
the microcontroller to minimize the time the appli-
cation may wait in the while loop.
We know the critical window is located at the end
of the frame, 6+ CAN bit times after the acknowl-
edge bit (exactly six full bit times plus the time from
the beginning of the bit to the sample point). Those
bits represent the acknowledge delimiter + the end
of frame slot.
We know also that those 6+ bits are in recessive
state on the bus, therefore if the CAN Rx pin of the
device is at ‘0’, (reflecting a CAN dominant state
on the bus), this is early enough to be sure we can
release the FIFO before the critical time slot.
Therefore, if the device hardware pin Rx is at 0
and there is a reception on going, its message will
be transferred to the FIFO only 6+ CAN bit times
later at the earliest (if the dominant bit is the ac-
knowledge) or later if the dominant bit is part of the
message.
Compiled with Cosmic C compiler, the workaround
generates the following assembly lines:
if ((CRFR & 0x03) == 0x02)
while
(( CMSR & 0x20) && ( CDGR & 0x08) )
{ };
CRFR |= B_RFOM;
Cycles
if ((CRFR & 0x03) == 0x02)
ld
a, CRFR
3
and
a,#3
2
cp
a,#2
2
jrne
_RELEASE
3
test: 10 cycles
while
(( CMSR & 0x20) && ( CDGR & 0x08) )
{ };
_WHILELOOP:
btjf
CMSR,#5,_RELEASE
5
btjt
CDGR,#3,_WHILELOOP
5
loop: 10 cycles
CRFR |= B_RFOM;
_RELEASE:
bset
CRFR,#5
5
release: 5 cycles



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com