UG-498
ADuCM320 Hardware Reference Manual
Rev. C | Page 186 of 196
MDIO Interrupt Power-Up Register Write Sequence
To avoid false MDIO interrupts on startup, the order of register writes is important. The following is a code example showing how to
correctly configure the MDIO interrupt on startup.
pADI_MDIO->MDCON = 0x0006;
pADI_MDIO->MDPHY = 0x0700;
sta = pADI_MDIO->MDSTA;
//read the MDSTA register to clear any interrupts
pADI_MDIO->MDIEN = 0x000F;
NVIC_ClearPendingIRQ(MDIO_IRQn);
//clear any pending interrupts in the Cortex
BLOCK SWITCHING
For MDIO applications, the system memory is separated into two flash blocks, as shown in Figure 37.
1
1176-
1
36
0x3FFFF
0x20000
FLASH 1
RESERVED
1
ACTIVE
NVR DATA
8kB
(IMAGE A)
INACTIVE
PROGRAM
120kB
(IMAGE B)
NOT USED
KEY2' (K2B1)
KEY1' (K1B1)
NOT USED
0x3FFFF
0x3FFE8
0x3E000
0x3DFE8
0x3DFE0
0x20000
FLASH BLOCK 0 ACTIVE
(FEECON1[3] = 0)
0x1FFFF
0x0
FLASH 1
RESERVED
1
FLASH BLOCK 1 ACTIVE
(FEECON1[3] = 1)
INACTIVE
NVR DATA
8kB
(IMAGE A)
ACTIVE
PROGRAM
120kB
(IMAGE B)
NOT USED
KEY2 (K2B1)
KEY1 (K1B1)
NOT USED
0x1FFFF
0x1FFE8
0x1E000
0x1DFE8
0x1DFE0
0x0
0x1FFFF
0x0
FLASH 0
RESERVED
1
INACTIVE
NVR DATA
8kB
(IMAGE B)
ACTIVE
PROGRAM
120kB
(IMAGE A)
NOT USED
KEY2 (K2B0)
KEY1 (K1B0)
NOT USED
0x1FFFF
0x1FFE8
0x1E000
0x1DFE8
0x1DFE0
0x0
0x3FFFF
0x20000
FLASH 0
RESERVED
1
ACTIVE
NVR DATA
8kB
(IMAGE B)
ACTIVE
PROGRAM
120kB
(IMAGE B)
NOT USED
KEY2' (K2B0)
KEY1' (K1B0)
NOT USED
0x3FFFF
0x3FFE8
0x3E000
0x3DFE8
0x3DFE0
0x20000
1
SEE THE FLASH CONTROLLER SECTION FOR MORE INFORMATION ABOUT RESERVED LOCATIONS.
Figure 37. Memory Maps for MDIO Block Switching