On 2013-07-29 15:23, Uwe Hermann wrote:
> Hi,
> 
> On Sun, Jul 28, 2013 at 11:14:17AM +0200, Clemens Novak wrote:
>> I'd like to propose an enhancement to the SPI protocol decoder: The
>> decoder waits for a H-L transition on CS#, before it starts
>> decoding. If CS# goes high before the provided number of bits are
>> received, the bits decoded so far are discarded.
>> 
>> I attached a diff file; maybe you are interested...
> 
> Looks like it patches a locally modified file? Can you resend the 
> patch
> against the current git version we have and write a short description
> as to what exactly the patch changes and how?
> 
> Also, do you have a specific .sr file we can test this against which
> shows the behaviour you want to support/fix?
> 
> 
> Thanks, Uwe.

Hi,

you are right, the diff is between two local files; although the second 
one being the latest version from git. I'm currently on a business trip 
and will send you a correct diff by the end of the week.

The current decoder implementation captures the value of MOSI / MISO on 
SCK edges (rising / falling edge according to configuration) independent 
of the CS# value. It considers a number of 'wordsize' SCK edges and 
calculates the transmitted data (based on the MOSI / MISO values at the 
SCK edges). When the captured data stream starts 'clean' (e.g. by 
triggering the capture on a CS# transition), the decoder works fine; but 
if the data stream starts in the middle of an SPI transmission (e.g. on 
the 3rd SCK edge), the decoder will produce wrong results: It considers 
MOSI / MISO at the 'wordsize' - 3 SCK transitions of the first SPI frame 
and MOSI / MISO at 3 SCK transitions of the next SPI frame.

The patch considers CS# and decodes MOSI / MISO only after a CS# H-L 
transition.

I have an SR file which shows the effects of what I have tried to 
describe; again, I will send you the file by the end of the week.

Regards - Clemens




------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to