From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

TNT4882 - finding it from MAX

You are right, my mistake. the TNT4882 does drive about 5V. this 5V is not driving the DSP continueously (only when I read a register) so I don't suspect it should effect the performance of the chip. Theoretically, I don't need to read any register in order to initialize the TNT and to have it recognized by the controller. I don't believe this 5V is causing a problem right now (although is should be modified in our next revision) because I am still reading all of the registers properly. Even the ADR register that is giving me a 0x01 when I read it is being read properly because I can verify the 0x01 coming out of the chip when I probe it with the digital scope when I'm reading from offset 0x0C. Besides if there is really a 0x01 in the ADR0, why doesn't the controller detect the TNT at address 1. instead, it finds it at 0. When writing to the TNT at ADR0 it is the DSP driving and we know we don't have an issue with voltages then (even though I'm quite confident at this point the 5V being driven by the TNT for such a short period of time is not a problem).

I think you were right before when you suspected a fundemntal problem. I think something is making the TNT disregard the ADR0 completly because if there is 0x01 in there (I see it coming out with the scope) and the controller is finding the TNT only at address 0, then it seems that ADR0 is not involved at all. Why would my data bus between the DSP and the TNT be a problem only when I am writing or reading to or from address 0xC.

I have taken out the SMSC chip out of the board. I have now only the TNT and the DSP. Of course this had no effect.
0 Kudos
Message 51 of 65
(1,361 Views)
This is really a tough one.

Some things to check/try:

1. Increase the setup/hold time of data relative to WR and CS. Internally, the TNT has different register implementations. What may work for one register may not work for another. I don't recall the details of the different register implementations. Also try increasing the write and read pulse widths.

2. Check clock/reset/power for noise/glitches.

3. Try writing some unique value (like 0xAA) to one of the CNT registers. Set up a loop in your firmware to read back this register continuously and check for errors.

4. Try simplifying your firmware to doing the following: first, just write a chip reset and set one-chip mode. Then try writing/reading the ADR.

5. I don't think this matters but try switching the order of writing one-chip mode with chip-reset. Try writing one-chip mode after the chip reset.
Message 52 of 65
(1,361 Views)
In addition to my last post, can you try to read offset 0x4, write 0x8F to offset 0x4, and then read offset 0x4 again?
0 Kudos
Message 53 of 65
(1,355 Views)
Ok, here is something interesting.

After I hard reset the tnt by turning off power and back on, I restart the init routine but skip the
TNT4882[R_cmdr]=F_softreset;
I am then able to write into and read from ADR0. I see that even before I even start the init routine I am able to write and read ADR0. now there are some strange side effects as well here. first, it seems that I am now reading the entire 16 bit bus and not just D7-D0 regardless of the ABUS and BBUS because I still have those set as before. the reason i think I am reading 16 bits is because I now see 00 instead of FF for the 8 msb in those registers that i'm use to seeing FF. second, after I set ADR1 with 0xE0, then when I read ADR (offset 0x0C) I read back 0xE0, like if I am actually reading ADR1 or writing to ADR 0xE0, over wrote ADR0 instead of ADR1.

what do you make of this?
0 Kudos
Message 54 of 65
(1,353 Views)
Also, in addition to my last post, I tried to put 0x8F into offset 0x04, but all I read back is 0x00
0 Kudos
Message 55 of 65
(1,353 Views)
This is really strange.

Can you increase the idle time between register accesses and also increase the data setup/hold time and RD/WR assertion times?
0 Kudos
Message 56 of 65
(1,347 Views)
Currently my setup time for data is over 200ns (spec has tws=14ns for min) and the RD/WR assertion times is about 200ns (spec has it at twp=40ns min). It seems that I have plenty of margin. I'm quite sure I already have these signals at slowest possible (they are controllable by the DSP). I'll double check though.
0 Kudos
Message 57 of 65
(1,343 Views)
What is your clock frequency into the TNT?
0 Kudos
Message 58 of 65
(1,341 Views)
40Mhz - I just measured. (0-3.3V pp)
0 Kudos
Message 59 of 65
(1,337 Views)
Ok, it looks like you are meeting setup/hold times.

Previously I had you write to and then read from CNT registers. I'd like you to do a slightly different test as follows:

write 0xAA to CNT0
write 0x55 to CNT1
read CNT0 and verify 0xAA
read CNT1 and verify 0x55

Loops this a few times.

I still think the problem is with the register cycles between the TNT and DSP.
0 Kudos
Message 60 of 65
(1,329 Views)