ST72521 STMICROELECTRONICS [STMicroelectronics], ST72521 Datasheet - Page 147
ST72521
Manufacturer Part Number
ST72521
Description
8-BIT MCU WITH NESTED INTERRUPTS, FLASH, 10-BIT ADC, FIVE TIMERS, SPI, SCI, I2C, CAN INTERFACE
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
1.ST72521.pdf
(211 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
ST72521BTC
Manufacturer:
ST
Quantity:
11 000
- Current page: 147 of 211
- Download datasheet (3Mb)
CONTROLLER AREA NETWORK (Cont’d)
Software Work-around - Devices without Hard-
ware Fix:
To implement a transmission abort under safe
conditions, any reset of the LOCK bit during the
critical window (2 bit times) must be avoided. Two
different cases have to be considered, either the
pCAN enters standby mode after the abort, or the
abort is performed and pCAN keeps running.
Abort followed by STANDBY mode (RUN=0)
In this case, aborting the pending transmissions
can safely be done by first entering STANDBY
mode and then releasing the transmit buffers.
STANDBY mode is entered by resetting the RUN
bit in the CSR register and once the current trans-
mission attempt, even if it fails due to error or lost
arbitration, has been performed, pCAN enters
STANDBY mode (RUN=0). Once in STANDBY
mode the application can abort all pending trans-
missions by resetting the corresponding LOCK bit.
_asm("SIM\n");
CANCSR |= NRTX;
while(!(CANBCSR & BUSY) &&// Wait till BUSY bit is set
while( CANBCSR & BUSY ); // Wait till BUSY bit is reset (falling edge)
if( CANBCSR & RDY )
{ // transmission still pending -> must be aborted
}
else
{ // No more abort required as RDY bit already reset
}
CANBCSR &= ~LOCK; //Arbitration lost => cancel transmission safel
while( CANBCSR & RDY );// Wait for unlock confirmed
CANCSR &= ~NRTX;// Reset NRTX bit once abort sequence done
_asm("RIM\n");
CANCSR &= ~NRTX;// Reset NRTX bit once abort sequence done
_asm("RIM\n"); // Enable interrupts
(CANBCSR & RDY) ); // or transmission done
// Mask interrupts
// Set non automatic retransmission bit
Abort while staying in RUN mode (RUN=1)
Contrary to the STANDBY case described previ-
ously, in the RUN case the application has to han-
dle the error or arbitration lost conditions. In case
of transmission errors, causing the frame to be
transmitted again and again, the application must
set the NRTX bit in the CSR register. This will
cause pCAN to abort the transmission at the end
of the current attempt.
In case of arbitration lost, setting the NRTX bit
does not abort the transmission, therefore the ap-
plication must reset the LOCK bit to abort the
transmission. To avoid resetting the LOCK bit dur-
ing the critical time window, leading to the problem
described at the start of this section, the applica-
tion must monitor the BUSY bit in the BCSR regis-
ter and reset the LOCK bit just after the falling
edge of the BUSY bit. The time between the falling
edge of the BUSY bit and the SOF of the next
transmission attempt is in any case long enough to
guarantee that the LOCK bit is reset before the
critical time window.
The “C” code sequence below shows the software
work-around for both the error and arbitration lost
cases.
ST72521
147/211
Related parts for ST72521
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
THYRISTORS
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
ADJUSTABLE INVERTING NEGATIVE OUTPUT CURRENT MODE PWM REGULATORS
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
0.25A SCRs
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
0.8A SCRs
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
Smartcard MCU With 4 additional I/0
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
SERIAL 2K (256 x 8) EEPROM
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
Search -----> STP10NB50FP
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
Search ---> STP12NB30
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
Search -----> STP13NK50Z
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
(MSS40 / MSS50) BACK TO BACK SCR MODULE
Manufacturer:
ST Microelectronics
Datasheet:
Part Number:
Description:
Dmos Programmable High Speed Unipolar Stepper Motor Driver
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
Part Number:
Description:
LOW Votage Telephone Speech Circuit
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
Part Number:
Description:
Technical Article
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
Part Number:
Description:
Thyristormodule
Manufacturer:
ST Microelectronics, Inc.
Datasheet:
Part Number:
Description:
SCR
Manufacturer:
ST Microelectronics
Datasheet: