Comments (18)
Please send screen shot
from la104.
from la104.
Where is the picture?
from la104.
Here they are.
The SPI output was created by a ESP32 set to SPI Mode0 and MSB
As Said: The Bit order of the MOSI is 1 0 1 1 1 0 1 1, which is indeed BB for MSB as shown by the decoder, but it is configured as LSB and then it should be DD.
from la104.
When you switch to MSB, will it show 0xDD?
from la104.
Yes it does
from la104.
Bit order in decoder:
https://github.com/gabonator/LA104/blob/master/system/apps/test17_official/source/Analyze.c#L29
MSB/LSB constants:
https://github.com/gabonator/LA104/blob/master/system/apps/test17_official/source/Analyze.h#L12
Menu:
https://github.com/gabonator/LA104/blob/master/system/apps/test17_official/source/Menu.c#L994
gInputSubParam[IN_SPI][3]
holds the information what kind of signal we are going to decode:
memcpy(¶m_str[LEN * 3], (gInputSubParam[IN_SPI][3] ? " MSB " : " LSB "), SIP_PARAM_STR_LEN);
where 0 means LSB and 1 MSB
#define LSB 0 //
#define MSB 1 //
SPI_AnalyzeFrame
does the decoding part:
if(CLK_Phase == 1) //
{
if(SCK_Now == CLK_Polarity)
{
AnalyzeBuf[j * 3 + 0] |= BIT_Order ? ((Status & 0x01) << k) : ((Status & 0x01) << (7 - k));
AnalyzeBuf[j * 3 + 1] |= BIT_Order ? (((Status >> 1) & 0x01) << k) : (((Status >> 1) & 0x01) << (7 - k));
if(k < 7) k++;
}
}
else //
{
if(SCK_Now != CLK_Polarity)
{
AnalyzeBuf[j * 3 + 0] |= BIT_Order ? ((Status & 0x01) << k) : ((Status & 0x01) << (7 - k));
AnalyzeBuf[j * 3 + 1] |= BIT_Order ? (((Status >> 1) & 0x01) << k) : (((Status >> 1) & 0x01) << (7 - k));
if(k < 7) k++;
}
}
k
is incrementing from 0 to 7, it holds the bit index. This expression BIT_Order ? ((Status & 0x01) << k) : ((Status & 0x01) << (7 - k))
should evaluate the bit weight, probably all of these 8 partial values are later summed together to get transmitted/received value. When decoding LSB frame, the first bit should give value 1 and 128 for MSB respectively. For LSB the Bit_Order
is zero (false), so the second term is evaluated ((Status & 0x01) << (7 - k))
which is wrong.
I recommend changing BIT_Order ? .....
into (BIT_Order == LSB) ? ...
which will invert the condition to fix this problem.
from la104.
Try this:
17analys.zip
from la104.
I renamed the original analyser.elf to enalyser.elf___ and took the content of your 17analys.zip and put it into the device as analyser.elf
Restart of the device. analyer started.. I am afraid. Exactly the same display.. BB on setting LSB ;-(
I am not familiar with the whole code but what about just inverting the Bit Order
......AnalyzeBuf[j * 3 + 0] |= BIT_Order ?.....
to
.....AnalyzeBuf[j * 3 + 0] |= ! BIT_Order ?.....
?
could that help ? (of course for all 4 ocurences)
from la104.
!BIT_Order
, BIT_Order == 0
, BIT_Order != 1
, BIT_Order == LSB
, BIT_Order != MSB
, all are equal. But ternary operator is a bit tricky, because you never know, if the negation operator !a ? b : c
is applied on the first argument, or on the result, so it is always safer to put the condition in parenthesis (!a) ? b : c
from la104.
I didn't notice that there are 8 places with this code, not four. Try this
17analys.zip
from la104.
yeah you are abolutely right with the parenthesis.
AND ! Tadaaa. I seems to work now. I owe you something
from la104.
Funny enough after YEARS of the LA104 being on the market I am the first to notice??? Hmmm :-)
And congrats to you for your work on this alternative firmware. Bombastic work !
from la104.
I would really like to know how many units did they sell and how many are actually used... but thank you for reporting this issue
from la104.
Glad that you could help me :-)
from la104.
You are welcome :) But why are you on friday night fighting with logic analyser and not somewhere out with friends and drinking beer? :)
from la104.
Poor me.. I am sick at home while they have one after the other :-( (pity is welcome)
from la104.
Fixed here a8904d5
from la104.
Related Issues (20)
- LA104 T1 and T2 jump when pressing 'OK' button
- FPGA configuration error
- DS213 Web Oscilloscope application gives no data (Hard Fault) HOT 6
- LA104 WebUSB connection problem 2 HOT 2
- Strange pattern shown on "desktop" when exiting Logic analyzer app HOT 1
- Logic Analyzer crashes when run HOT 1
- DSO203 HW2.60, Windows 10/11 DFU HOT 11
- RFTool capture tab shows no data.
- Diff. between Flipper Zero and LA104 HOT 15
- Major refactoring needed HOT 6
- LA104 add new protocol into filmware HOT 5
- Dockerfile broken HOT 1
- Changes HOT 2
- Fresh compile is successful, but error booting HOT 6
- Test apps.
- Display battery level on main screen
- Boot loader for LA104
- Use La104 with DT71 tweezers
- Replacing of external (usb) flash DS213 HOT 2
- Wave alchemy HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from la104.