Hi Rob,
Thanks for your help. With some digging around of some old archives, I think I have figured out the proper way to configure the device - but have still not had any success. When I place a scope on the OE, WE, CS3, ADDR0 signals (X5 connector on eval kit) I see no action! .
I am using netOS 7.3, on digi evalkit.
Below is the code snippets:
SETUP Code:
// set Size of Memory Map to 0x2000 (8k)
narm_write_reg(NARM_CSOR_REG, NARM_CSOR3_ADDR,mask, customizeCreateMask(0x2000) >> CS_BASE_MASK_SHIFT);
// set wait states
narm_write_reg(NARM_CSOR_REG, NARM_CSOR3_ADDR,wait, 15);
// set 8-bit data
narm_write_reg(NARM_CSOR_REG, NARM_CSOR3_ADDR,ps, CSOR_8_BIT_PORT_SIZE);
// set base address to be 0x7000000 (dec 117440512)
narm_write_reg(NARM_CSAR_REG, NARM_CSAR3_ADDR,base, 0x7000000 >> CS_BASE_MASK_SHIFT);
//unset write protect.
narm_write_reg(NARM_CSAR_REG, NARM_CSAR3_ADDR,wp, FALSE);
// set valid
narm_write_reg(NARM_CSAR_REG, NARM_CSAR3_ADDR,v, TRUE);
baseAddress = (*NARM_CSAR3_ADDR) & (unsigned long)0xFFFFF800;
cout << "NARM_CSAR3_ADDR : " << (*NARM_CSAR3_ADDR) << endl;
cout << "NARM_CSOR3_ADDR : " << (*NARM_CSOR3_ADDR) << endl;
cout << "NARM_CSORB3_ADDR : " << (*NARM_CSORB3_ADDR) << endl;
cout << "baseAddress: " << baseAddress << endl;
So I have my 3 registers with the following values (in decimal):
NARM_CSAR3_ADDR : 117440513
NARM_CSOR3_ADDR : 4093636360
NARM_CSORB3_ADDR : 0
baseAddress: 117440512
So I verify that I am setting them correctly.
This is how I am performing my read / write:
unsigned char DataPort::read(int address)
{
ulong address2 = baseAddress + address;
//next line is debug only
cout << “DataPort::read :” << address2 << " - " << *((unsigned char *) address2) << endl;
return *((unsigned char *)address2);
}
so if I read register addresses 0x00-1FFF (physical address 0x700001 - 0x701FFF), I always read the value 232 (0xE8)
>DataPort::read :117440513 - ë
>ADDRESS 0x1 : 232
So… I see no action on the external bus with my scope, and always read value of 232. So… I must be doing something wrong!
Also, the timing diagrams documented in the NS7520 are not specific to the 7U… The 7U only has a WE and OE signals available, so perhaps there are some more special settings?
Any help appreciated. I’m going to send a copy of this to tech support.
Best Regards,