Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

USB low-full-high speed peripherals Forum Discussions

Anonymous
Not applicable

In FX2LP, transaction counter can be read while transaction is in progress. Is there a way to make an "atomic" read of the all 4 transaction count registers? Otherwise reading them is useless, because if an update occurs in between of read operation, the data read would be corrupted

0 Likes
3 Replies
Anonymous
Not applicable

You should be able to read those 4 transaction registers at any point of time. I don't think data gets corrupted just because we are reading them. Did you encounter any situation where the data of these registers got corrupted?. Please let me know.

   

Thanks,

   

sai krishna.

0 Likes
Anonymous
Not applicable

Suppose transaction count contains 0x00FFFF00.  I read lower byte - it is 0x00. Before I read other bytes, a transaction occors, and count now contains 0x00FFFEFF. And the final value I read is 0x00FFFE00 - totally wrong.

0 Likes
Anonymous
Not applicable

Hi,

   

Why do you want to read the transaction counter while there is a read/write operation is going on?
Are you somewhere in the firmware reading the values and doing any operations according to the values?
You can rather use FIFO Read/Write operation appropriately.

What are you exactly trying to implement with this logic?

Njoy...

0 Likes