Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service
   Home P&E Customer Support FAQs - Frequently Asked Questions FAQ ID # 121
FAQ ID # 121
 
Question
When using a programming algorithm to program an external flash device, is there a simple way to test the processor's chip select configuration to make sure it's configured properly?
 
Answer

PEmicro has added a new Chip Select Diagnostic mode to its interactive flash programmers to allow the user to diagnose memory map configuration problems.

PEmicro’s flash programmers support an extensive array of external flash devices connected to the processor. PEmicro’s algorithms are designed to work by default when the flash device is connected to the boot chip select and no modification is needed to the reset configuration of the output enable and write enable lines. However, there are numerous ways in which the flash can be connected that may require changes to the default reset configuration of the processor’s chip select, write enable, and output enable operation.

When another configuration is used, the algorithm may require some modification to work. This often involves writing to the chip select registers to change which chip select is used, to make certain chip selects read only or write only, or to change the base address of the chip select. PEmicro’s algorithms expect the flash to be located at a specific location in the memory map. This location is listed in the algorithm itself as a comment. An example can be seen here:


;begin_cs device=$00000000, length=$00800000, ram=$10000000

This line indicates that the flash must be configured to be in the memory map at address 0, and that the full range $00000000-$00800000 must be configured to address the flash. This is separate from the “Base Address” capability in the programmer user interface which makes the flash appear to be anywhere the user selects it (internally it physically resides at a specific location).

On many devices the boot chip select is enabled everywhere. If a configuration change is needed, there are many commands which allow the registers on the device to be written during startup. The WRITE_LONG, WRITE_WORD, and WRITE_BYTE commands are examples of commands which can be used to write to memory mapped registers. There are also commands on some architectures to allow the configuration of where the registers are located, such as the CONTROL command on the ColdFire architecture. Here is an example of initializing the CS1 chip select on a 5272 device instead of the default CS0 chip select (the boot chip select).


CONTROL=20000001/0C0F/           ;set mbar on with address $20000000

WRITE_LONG=00000000/20000040/    ;cs0 off

WRITE_LONG=00000201/20000048/    ;proc=5272 cs=CS1 16 bits, r/w

WRITE_LONG=00000078/2000004C/    ;proc=5272 cs=CS1 on

The question often comes up : How do I know my chip select configuration is correct?

PEmicro has added a diagnostic tool to it’s interactive flash programmers which allow the user to test the chip select configuration to make sure the chip select, write enable, and output enable signals have been properly configured. The utility may be chosen from the “ChipSelectsDiagnostic” selection on the main menu bar. A portion of the utility is shown here:

Chip Selects Diagnostics

The user will need a scope or a logic probe to see if the signals maintain the proper state during the test read and test write functions. Setting the chip select registers properly solves the majority of support questions PEmicro receives regarding external flash algorithms.

New flash algorithms may be requested on PEmicro's Flash Programming Algorithms page.

 
Related Downloads
none
 
Architectures Categories Products
HC08, HCS08, HC(S)12(X), 68HC16, CPU3xx, ColdFire V2/V3/V4, Power MPC5xx/8xx, Qorivva MPC5xxx, RS08, ColdFire V1 Flash Programming Software, Stand-Alone Programmer XPC560PKIT100S, XPC560SADPT280S, CYCLONEPRO, PROGHCS08, PROG12Z, PROG16Z, PROG32Z, PROGCFZ, PROGMCZ, PROGPPCZ, CYCLONE_MAX, PROGRS08, CYCLONE_MAX_REPLACE, Compsol Software, UNIT12Z-LINUX-DIST, DEMO9S08QE8, XPC560PADPT144S, XPC560PKIT144S
 
Please rate this FAQ to help us improve our support
0 means "not helpful"
10 means "very helpful"
0 1 2 3 4 5 6 7 8 9 10

© 2017 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement