English
Language : 

PXR40RM Datasheet, PDF (294/1434 Pages) Freescale Semiconductor, Inc – PXR40 Microcontroller
Boot Assist Module (BAM)
NOTE
The loaded code must periodically refresh the core watchdog timer or
change the timeout period to a value that does not cause resets during
normal operation.
9.5.5.5 Baud Rate Detection Procedure
When EVTO pin is driven low during reset, the BAM program enters into Baud Rate Detection mode.
Following additional steps are taken:
1. The baud rate detection routine is copied to the beginning of the system RAM from the BAM ROM
to improve baud rate detection accuracy
2. The CPU branches to the RAM
3. The MCU configures the CNRX_A and RXD_A pins as general purpose inputs
4. The MCU polls these GPIs until one of them goes low
a) If the CNRX_A pin transitions first, the BAM program starts CAN baud rate detection routine,
ignoring RXD_A. After detecting the CAN baud rate, the BAM program transitions to the
CAN download protocol routine described above.
b) If the RXD_A pin transitions first, the SCI baud rate detection and download protocol routines
are called, ignoring any further CAN pins activity.
The host, executing the serial boot, should send a test frame in order the MCU can detect the host
communication speed. When booting through the SCI, the host should send a zero byte as the test frame.
When booting through the CAN, the host should send zero ID, zero length message as the test frame.
The MCU requires some time to setup its communication interfaces speed. To accommodate this the host
should send serial password not earlier than after 2000 MCU system clock periods.
9.5.5.5.1 SCI Baud Rate Detection.
The host must send a zero byte to allow the MCU to detect the serial link baud rate. The host transmits one
start bit, eight zero data bits and one stop bit (the MCU does not echo it).
The MCU polls the RXD_A pin for high to low transition and starts the e200 core Time Base counter (TB).
Then the MCU polls for low to high transition on the pin and when it happens, the MCU turns off the TB
counter. The TB content is used to calculate incoming signal baud-rate. The SCI baud rate is equal to the
TB content divided by 288. (Measured over 9 bits with 16 system clocks per bit and the core frequency is
two times higher than system frequency).
9.5.5.6 CAN Baud Rate Detection.
The host transmits a zero length message with zero 11 bit ID and MCU measures time over 40 bits, polling
CNRX_A pin for high and low, according to the sent data. The MCU does not acknowledges this message.
The CAN baud rate depends on the number of quantas per bit and serial clock frequency, which is defined
by a prescaler. The CAN baud rate detection routine selects these parameters to maximize number of
9-14
PXR40 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor