Hi, as the title says, I'm tryng to analyze a custom protocol in the logic analyzer in WaveForms.
I can't disclose every detail but I can write some example code.
My problem is the following: my protocol has more than 32 bits per word, how can I pass a full word to the Value2Text function?
I tried to assign a byte array to the rgValue variable, I can confirm it works as intended through the debug window.
The Value2Text script however receives a 0 value parameter, not the array I assigned.
I took the SPI example and modified it, the relevant part is:
...// store rgValue/Flag from word start index to current sample positionfor(var j = iStart; j < i; j++){// Flag change will be visible on plot even when data remains constant.// This is useful in case we get more consecutive equal values.
rgFlag[j]= cByte;
rgValue[j]= bValue;// NOTE: here bValue is an array, not a byte}...
And as I said, the value to text script:
functionValue2Text(flag, value){// NOTE: value is 0...
Question
s4msepi0l
Hi, as the title says, I'm tryng to analyze a custom protocol in the logic analyzer in WaveForms.
I can't disclose every detail but I can write some example code.
My problem is the following: my protocol has more than 32 bits per word, how can I pass a full word to the Value2Text function?
I tried to assign a byte array to the rgValue variable, I can confirm it works as intended through the debug window.
The Value2Text script however receives a 0 value parameter, not the array I assigned.
I took the SPI example and modified it, the relevant part is:
And as I said, the value to text script:
Thanks a lot for your help.
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now