![ST SPC563M64CAL144 Reference Manual Download Page 27](http://html1.mh-extra.com/html/st/spc563m64cal144/spc563m64cal144_reference-manual_1355939027.webp)
RM0345
Calibration software compatibility and configuration
Doc ID 024080 Rev 3
27/38
9.2
Example Configuration CODE
The following code is used to configure the calibration bus for 16bit de-multiplexed mode.
//---------------------------------------------------
// SIU PCR (Pad Configuration Register) setup
// (Cal BUS bommon drive strength = 20pF, DSC = 0b01)
//---------------------------------------------------
SIU.PCR[336].R = 0x0040;//CAL_CS[0]DSC=20pF (0b01)
SIU.PCR[338].R = 0x0440;//CAL_CS[2] (PA=0b1),DSC=20pF (0b01)
SIU.PCR[339].R = 0x0040;//CAL_ADDR[11] (PA=0b0), DSC=20pF (0b01)
SIU.PCR[340].R = 0x0040;//CAL_ADDR[12..15], DSC=20pF (0b01)
SIU.PCR[345].R = 0x0040;//CAL_ADDR[16..30], DSC=20pF (0b01)
SIU.PCR[341].R = 0x0040;//CAL_DATA[0..15], DSC=20pF (0b01)
SIU.PCR[342].R = 0x0040;//CAL_RD/WR, CAL_WE[0-1], CAL_OE, DSC=20pF
(0b01)
SIU.PCR[343].R = 0x0040;//CAL_ALE, DSC=20pF (0b01)
//--------------------------------------------------
// SIU ECCR (External Clock Control Register) setup
//--------------------------------------------------
SIU.ECCR.R = 0x1000//External Bus Division Factor = 1 (EBDF=0b00)
//--------------------------------------------------
// EBI Registers setup
//--------------------------------------------------
//-----------------------------------------------------------------
// EBI MCR setup for 16-bit bus configuration:
//
// EARP = 01 (Equal priority);
// D16_31 = 0 (DATA[0:15] signals are used for 16-bit port accesses);
// AD_MUX = 1 (Addr on Data Multiplexing Mode is used for non-CS acc.);
// DBM = 0 (32-bit Data Bus Mode is used);
EBI.MCR.R = 0x802;
//------------------------------------------------------
// EBI Base Register setup for 16-bit bus configuration:
//
// Base Address = 0x20000000;
// PS = 1 (16-bits port size)
// AD_MUX = 1 (Address on Data Multiplexing Mode is enabled for this chip select);
// WEBS = 1 (Use BE function);
// BI = 1 (Disable burst accesses for this bank);
// V = 1 (Valid CS Bank)
EBI.CAL_CS[0].BR.R = 0x200008A3;