WriteToPipeIn() & UpdateWireIns()


Hi Jake,

I think I encountered a problem.

I’m using XEM3001v1 with firmware 20050622 and FrontPanel 1.2.3a.

My app continuously WriteToPipeIn() 512KB of data to the XEM (I added 2x512K SRAM) and I insert UpdateWireIns() to pause or resume the stream on the push of a button.

If I don’t use UpdateWireIns(), everything is fine but if I call UpdateWireIns() by pushing repeatedly the button, after 20 or 30 times or so, the WriteToPipeIn data on the FPGA side gets screwed up and stays that way.

I checked my app data before sending it to the FPGA to make absolutely sure the data was not corrupted before the WriteToPipeIn() call. I also checked with a logic analyzer the 512K mem data bus and found there that only the last part of the 512K block gets transferred when the system gets screwed up.

Also, if I call UpdateWireIns() but ignore it on the FPGA side, I get the same problem which leads me to think that there might be a problem with the combination WriteToPipeIn() & UpdateWireIns().

Please can you check out on your side ?

Many thanks in advance.


Hi Jake,

Oops, a thousand apologies. It was my mistake: the call to UpdateWireIns() was sometimes happening during WriteToPipeIn() i.e. I didn’t protect with a mutex.

Funny how it is: it was obvious but still I struggled a couple of days turning round and round, and it’s only after posting my request that I immediately realized my mistake.

I’m sorry again.

Best regards,


I can’t tell you how many times the same has happened to me. It’s often a big help to talk a problem through with someone – even if they don’t help directly, they do.

Glad you fixed your problem!