mon166 configuration for Infineon C167

Problem -----------------------------------------------------------------------

I am not able to successfully configure MON166 (bootstrap mode) to flash onto my external flash memory so that it communicates properly with my host PC and downloads my target firmware to the external RAM. In fact, when I download the MON166 it gives me an error regarding loss of communication with target.

Components on my board

-------------------------------------------------------

  1. Infineon C167CS-L40M microprocessor
  2. 128 KByte external flash memory
  3. 128 KByte external RAM memory

Development tools I use

-------------------------------------------------------

  1. Keil C166 Compiler, Assembler, and linker (latest C166 version)

Configuration of MON166 (CONFIG.INC file)

-------------------------------------

CS1# controls the external RAM memory CS0# controls the external FLASH memory BUSCON1 = 0x4BF BUSCON0 = 0x4BE ADDRSEL1 = #5 (128 KByte range starting at address 0x00000) DISABLED remaining BUSCONx registers SYSCON0 = 0x7 DISABLED remaining SYSCONx registers

DATA_START = 0x3A600 CODE_START = 0x3A800 VECTAB = 0x30000

On Keil -> "Options for target" -> tab "Target" -> External Memory: - RAM = Start: 0x20000, Size: 0x20000 - ROM = START: 0x00000, Size: 0x20000

Configuration of Test LED Program (START67.A66)

------------------------------

BUSCON1 = 0x4BF BUSCON0 = 0x4BE ADDRSEL1 = #5 DISABLED remaining BUSCONx registers SYSCON0 = 0x7 DISABLED remaining SYSCONx registers

On Keil -> "Options for target" -> tab "Target" -> External Memory: - RAM = Start: 0x400, Size: 0x1FC00 - ROM = Start: 0x30000, Size: 0x10000

On Keil -> "Options for target" -> tab "L166 MISC" -> Interrupt vector table address: 0x30000

Hardware Configuration

--------------------------------------------------------

It is set up for 16-bit De-multiplexed bus mode so that PORT0, high byte is used for putting address on the bus (A15..A0) and the PORT0, low byte is used for reading data from/writing data to the bus. Further, additional segment addresses A17..A16 are used (we have configured it for 256 KByte address space). Also, it is set for 20 MHz clock.

Conclusion -------------------------------------------------------------------

I am hoping the memory is setup therefore as follows:

0x00000 to 0x1FFFFF (128 KByte RAM) 0x20000 to 0x3FFFFF (128 KByte FLASH)

Interrupt table is at 0x30000 (so it is in the Flash)

The Test LED Program code is stored at 0x30000 while the firmware variables and non-constants are stored at 0x400 on the RAM.

The Monitor code will be stored on the FLASH at 0x00000 and then, during execution, the monitor data will run on the RAM at 0x3A600 and the monitor code will run on the ROM at 0x3A800.

If anyone can help me in telling me what I am doing wrong in configuring the Monitor and the LED test program so that I can finallly have a properly configured MON166 for my Infineon C167 chip that would be very helpful.

Reply to
Abhinav
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.