pinseq() usage Topic is solved

New to XMOS and XCore? Get started here.
Henry
Junior Member
Posts: 7
Joined: Mon Jun 03, 2024 10:19 am

pinseq() usage

Post by Henry »

Hello Xcore Team

XU216 Device, run at 500MHz
The steps of the procedure are as follows:

on tile[0]: in port p = XS1_PORT_1D;

1. The external device drive the pin low.
2. XMOS waits until the pin get low, "p when pinseq(0) :> void;"
3. XMOS communicate to external device, and then the external device will drive the pin to high.
4. XMOS wait the pin change to high. "p when pinseq(1) :> void;"

On the oscilloscope, I can see that after communicating with the external device, the external device drive the pin high about 4ms and then drive it low.
But the program is stuck in step 4
It seems that the program does not detect the 4ms high pulse

Is this the problem caused by my usage of pinseq() ?
View Solution
User avatar
Ross
Verified
XCore Legend
Posts: 1070
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

My first guess would be that your code in step 3 is taking too long and then step 4 happens too late, and the high-pulse is missed.

Quick experiment, at the end of step 3 drive another io high from the xcore. Compare the two signal timings on your scope.

(What is this device, BTW?)
Technical Director @ XMOS. Opinions expressed are my own
Henry
Junior Member
Posts: 7
Joined: Mon Jun 03, 2024 10:19 am

Post by Henry »

Thanks Ross :)
Just solved, when I change the pin definition to "on tile[0]: in buffered port:32 p = XS1_PORT_1D".
Refer to this topic: Is it possible to use pinseq/pinsneq on a 1 bit port that's (https://www.xcore.com/viewtopic.php?t=3618)