TI,
AM1808, WinCE 6.0 BSP from MPC Data
I am using the UPP (Universal Parallel Port) to receive data from an A/D converter. I am currently using the example UPPTest.exe program to test my hardware. When testing, I am seeing data discontinuities in the received data stream. The discontinuities occur consistently throughout the data with an interval equal to the driver PAGESIZE. In other words, when the driver switches from one buffer to the next, it loses some samples. I have made only minor changes to the given programming example. They are:
UPPTest.c:
"if(!CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)WriteThread, NULL, 0, NULL))..." was commented out. This stops data transmission. Not needed.
platform.reg:
In the "UPP Driver" section:
1) UPP Channel A, mode is changed from 2 to 0. This changes from duplex mode where channel B transmits and channel A receives to channel A receives only.
2) UPP Channel B, loopback is changed from 1 to 0. This turns off loopback from channel B to channel A. Channel A now gets data from the hardware port and its connected A/D converter.
This problem does not seem to occur at the example 500KHz clock rate, but does happen at 1MHz and higher. I have tested this setup at 100MHz clock rate and it works well except for the discontinuities. The max clock rate for this port is stated as CPU clock / 4 = 114MHz. I would like this to work with a buffer size of 50MB. Any thoughts? Would altering the driver to work with a single large buffer do the job? I do not need to run continuously, just fill a large buffer, stop and then process it.
Best Regards,
Nelson