5136-DNP-PCI
Hardware Reference
© 1999 SST/Woodhead Canada Limited
15
4.6 Loading an Application Module in Compatible Mode
The following sections describe the sequence of steps to load an application module into the 5136-DNP-PCI card.
The loader application provided with the software handles this process. For register descriptions, see section 4.3.
4.6.1 Test for 5136-DNP-PCI at I/O port address specified
1.
Write zero to each of the configuration registers (BCR0, BCR1 and BCR2) in case of a re-load condition.
2.
Write 0x06 to BCR0.
3.
Read BCR0. It should contain 0x02.
4.
Write 0x00 to BCR0.
5.
Read BCR0. It should contain 0x00.
6.
(Optional) Read IDR. This register should contain 0x10.
4.6.2 Check for conflicting RAM
During these steps, disable operating system task switching, interrupts and any other processes that may be using
the target memory.
1.
Read a word from the target memory block and save it.
2.
Write 0xAA55 to the target address.
3.
Read the target address. It should not contain 0xAA55.
4.
If the result is 0xAA55, restore the saved contents of the target address and abort the load procedure.
5.
Refer to section 4.6.10 for further instructions.
6.
Repeat steps 1-3 for the entire target memory block.
4.6.3 Enable and test the card RAM
1.
Write MemBase in BCR1 to set the card RAM base address.
2.
Set MemEn in BCR0 to enable card memory.
3.
Select memory bank as required by writing to Bank in BCR0.
4.
Fill the memory bank with a test pattern.
5.
We recommend storing the byte offset as a 16-bit value in each word of memory (for example, write
0x0000 to the first word, 0x0002 to the next word and so on).
6.
Read and verify the test pattern written in step 4.
7.
If the memory test fails, abort the load procedure.
8.
Refer to section 4.6.10 for further instructions.
9.
Fill the memory bank with 0.
10.
Repeat steps 3-7 for all other memory banks.
4.6.4 Load the application module
Select the memory bank as required in the following steps by writing to Bank in BCR0.
1.
Write the application module to banks 4, 5, 6 and 7.
2.
The application binary file is 65535 bytes in length; the last byte of bank 7 is unused.
3.
Calculate the sum of all of the bytes in banks 4, 5, 6 and 7 except the last byte of bank 7 (unused). The
least significant byte of the result should be zero.
StockCheck.com