Chapter 33 Boot Assist Module (BAM)
MPC5602P Microcontroller Reference Manual, Rev. 4
842
Freescale Semiconductor
Example 33-6. 20 MHz crystal
Consider case where using a 20 MHz crystal, user attempts to send 62.5 Kb/s FlexCAN message.
— Time base, clocking at crystal frequency, would measure:
— 62.5 Kb/s = 320 clocks/bit => 29 * 320 = 9280 clocks
— To calculate PRESDIV = 9280/725 = 12r580 => PRESDIV = 12
— To calculate time quanta requirement:
— Time base result = 29 x (1) x (S TSEG1 + TSEG2)
— 9280 = 29 x 13 x (1 + TSEG1 + TSEG2)
— 1 + TSEG1 + TSEG2 = 24.6~ 25 (need to round up - S/W must track remainder)
— From the lookup table, CANA_CR = 0x0C7F_200D.
— This give a baud rate of 61.538k Baud
— This equates to an error of: ~1.6%
This excludes cycle count error introduced due to software polling likely to be ~6 system clocks.
33.6.2
Interrupt
No interrupts are generated by or are enabled by the BAM.
33.7
Censorship
Censorship can be enabled to protect the contents of the flash memory from being read or modified. In
order to achieve this, the censorship mechanism controls access to the:
•
JTAG / Nexus debug interface
•
Serial boot mode (which could otherwise be used to download and execute code to query or modify
the flash memory)
To re-gain access to the flash memory via JTAG or serial boot, a 64-bit password must be correctly entered.
CAUTION
When censorship has been enabled, the only way to regain access is with the
password. If this is forgotten or not correctly configured, then there is no
way back into the device.
There are two 64-bit values stored in the shadow flash which control the censorship (see
for a
full description):
•
Nonvolatile Private Censorship Password registers, NVPWD0 and NVPWD1
•
Nonvolatile System Censorship Control registers, NVSCI0 and NVSCI1
33.7.0.1
Censorship password registers (NVPWD0 and NVPWD1)
The two private password registers combine to form a 64-bit password that should be programmed to a
value known only by you. After factory test these registers are programmed as shown below:
•
NVPWD0 = 0xFEED_FACE