NEC V850E/MA1 Application Note page 74

32-bit single-chip microcontrollers pci host bridge macro
Hide thumbs Also See for V850E/MA1:
Table of Contents

Advertisement

/////////////////////////////////////////////////////////////////////////
// Function name: PCI_HBM_Init
// Function: Initializes PCI Host Bridge Macro.
// Argument: None
// Return value: None
// Remark: Base addresses of this initialization sample are as follows.//
//
- Base address of PCI I/O space:
//
- Base address of PCI memory space: 0CC0_0000H
//
- Base address on PCI bus memory space in which
//
main memory (SDRAM) is mapped:
//
- Range of PCI bus memory space in which
//
main memory (SDRAM) is mapped:
//
Other settings are required according to system
//
requirements and mounting.
/////////////////////////////////////////////////////////////////////////
void PCI_HBM_Init(void)
{
V850EME2_REGW(PHBMR_PCI_CONTROL) = 0x07000110;
// PCI_CONTROL register
//
bit 31-24:
//
//
bit 15-08:
//
bit
4:
V850EME2_REGW(PHBMR_PCI_IO_BASE) = BASE_ADDRESS_PCI_IO;
// PCI_IO_BASE register
//
Set PCI I/O space base address to C800000H.
V850EME2_REGW(PHBMR_PCI_MEM_BASE) = BASE_ADDRESS_PCI_MEM;
// PCI_MEM_BASE register
//
Set PCI memory space base address to CC00000H.
V850EME2_REGW(PHBMR_PCI_CONTROL) = 0x07000113;
// PCI_CONTROL register
//
bit 31-24:
//
//
bit 15-08:
//
bit
4:
//
bit
1:
//
//
bit
0:
//
V850EME2_REGW(PHBMR_SYSTEM_MEM_BASE) = BASE_ADDRESS_SDRAM;
// SYSTEM_MEM_BASE register
//
Set base address on PCI bus memory space in which main
//
memory (SDRAM) is mapped to 4000000H.
74
CHAPTER 5 APPLICATION EXAMPLES
PCI_PARKCNT = 1
(Set time for shifting to bus parking to 7)
PCI_REQ = 1
(Enable I_REQ_B0)
PCI_RESET bit = 1 (Release PCI bus reset)
PCI_PARKCNT = 1
(Set time for shifting to bus parking to 7)
PCI_REQ = 1
PCI_RESET bit = 1
PCI_MEM_EN bit = 1
(Enable access from CPU to PCI memory area)
PCI_IO_EN bit = 1
(Enable access from CPU to PCI I/O area)
Application Note U17121EJ1V1AN
0C80_0000H
0400_0000H
03FF_FFFFH
(Enable I_REQ_B0)
(Release PCI bus reset)
//
//
//
//
//
//
//
//
//
//
//
//

Advertisement

Table of Contents
loading

This manual is also suitable for:

V850e/ma2V850e/ma3V850e/me2

Table of Contents