ST72521R9 STMicroelectronics, ST72521R9 Datasheet - Page 148

no-image

ST72521R9

Manufacturer Part Number
ST72521R9
Description
8-BIT MCU WITH NESTED INTERRUPTS, FLASH, 10-BIT ADC, FIVE TIMERS, SPI, SCI, I2C, CAN INTERFACE
Manufacturer
STMicroelectronics
Datasheet

Specifications of ST72521R9

Hdflash Endurance
100 cycles, data retention
Clock Sources
crystal/ceramic resonator oscillators, internal RC oscillator and bypass for external clock
Four Power Saving Modes
Halt, Active-Halt, Wait and Slow
Main Clock Controller With
Real time base, Beep and Clock-out capabilities
Two 16-bit Timers With
2 input captures, 2 output compares, external clock input on one timer, PWM and pulse generator modes
8-bit Pwm Auto-reload Timer With
2 input captures, 4 PWM outputs, output compare and time base interrupt, external clock with event detector
ST72F521, ST72521B
CONTROLLER AREA NETWORK (Cont’d)
Software Work-around - Devices with Hard-
ware Fix (ST72F521 rev “R”):
To implement a transmission abort under safe
conditions, the LOCK bit must not be reset during
the critical window (2 bit times). A new function
has been implemented in the MCU allowing the
application to synchronize the reset of the LOCK
bit (abort request) with the reset of the TXRQST bit
(internal signal) in the pCAN core.
The synchronization is done using the WKPS bit in
the CANCSR register, the function of this bit has
been modified and no more Wake-up Pulse (dom-
inant bit) is sent on the CAN_TX signal when the
WKPS bit is set. This means the functionality de-
scribed in the datasheet is no longer applicable
(see
148/215
CANCSR |= WKPS;
while(!(CANCSR & WKPS) );// Wait until WKPS bit is set
while( CANBCSR & LOCK )// Wait until abort has been confirmed
{
}
CANCSR &= ~WKPS;
CANBCSR |= LOCK;
Section
10.8.5.4).
CANBCSR &= ~LOCK;
// Set WKPS bit
// Allow transmission again
//Alloc buffer for next transmission
To abort the transmission, first the application sets
the WKPS bit and polls it until it is set. The maxi-
mum time needed to set this bit is two CAN bit
times. Once the application has read the WKPS bit
as one, it can reset the LOCK bit to stop the cur-
rent transmission.
The abort is completed when the LOCK bit is read
back as zero by the application. Once the abort
has been completed, the application must reset
the WKPS bit to be able to transmit again. Of
course the transmit buffer must be in LOCK state
as usual before any transmission attempt.
The “C” code sequence below shows the software
work-around using the WKPS bit.

Related parts for ST72521R9