Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
I am monitoring an SPI link using the TAP. The device under test requires "polling" using a command of "0x03" to determine device ready before actually transferring data. There can be hundreds (or even thousands) of unproductive polls before the device is ready.
I added a TX/RX Filter with the intention of removing the nonproductive transactions, but I can't figure out how to "configure" it. When I go to the configuration panel, I see "TX/RX Filter" listed, but only "Show TX/Show RX" buttons.
Also, is it possible to filter out the "SS high" / "SS low" messages? There's only 1 device on the link so I already know the select goes low/high for each packet.
Thanks.
After poking around in the scripts/plugins directory, I can see various ways to attack the problem.
Using the filter, I am able to filter out the stop/start messages with "I2cSpiTapLogRecordCode.Spi{Start,Stop}". However if I delete both of them, I get no packet boundaries between SPI packets. I assume I need to use a more powerful tool than filter if I want delete the message, but cause a the packet to be emitted. I assume that's a "converter".
I should be able to filter out the "polls" using filter, but I have no idea what the format of the data passed via the void * pointer is. Is there documentation on this?
void *
So I guess the two pieces of information that would help me are:
What is the format of the data for the TxRx packets. Does the data change when the "swap" button is active, or is that done by a UI filter.
How does one signal to the generic TxRx formatter that a packet has ended and to emit current buffer. I would do this in a "converter" when I get the SpiStop code. (And just absorb the SpiStart code.)
Are the messages and data formats passed by the "I2C / SPI Tap" documented? That would be most helpful.
I'm using a converter (for what I'm doing a filter would be fine) and have managed to get from to
My converter is pretty small. In relevant part it is
switch (recordCode) { case log.StdRecordCode.TxRx: // filter out polls if (*(uint8_t const *)p == 0x03) return true; inFrame = true; return false; case I2cSpiTapLogRecordCode.SpiStop: if (inFrame) return inFrame = false; return true; case I2cSpiTapLogRecordCode.SpiStart: return true; default: return false; // don't convert other records }
And while it is close enough for my purposes, I would like to know how I can get rid of the "SS High" messages. I had to leave them in so that the individual SPI frames would not be all joined together as one big blob of data.
I am just wondering if there is a message I can send from the converter to cause pending data to be written out without generate a record as the "SS High" (or a write("\n")) would.
write("\n")
Hello Kent,
Apologies for not getting back to you sooner. Looks like you figured it out by yourself already
See my answer to your questions below.
I would like to know how I can get rid of the "SS High" messages. I had to leave them in so that the individual SPI frames would not be all joined together as one big blob of data.
To prevent merging of the last log record with the upcoming ones, add a "break" like this:
writer.write(timestamp, log.StdRecordCode.Break);
I assume I need to use a more powerful tool than filter if I want delete the message, but cause a the packet to be emitted. I assume that's a "converter".
A converter is more powerful, yes -- as it can also add extra records (or transform existing ones) while a filter can only hide or show original records.
What is the format of the data for the TxRx packets.
The data size is always even; the first half is MOSI, and the second is MISO.
Does the data change when the "swap" button is active, or is that done by a UI filter.
Pressing the button flips the first and second half in upcoming TxRx records. This is just a convenience tool, so that if you accidentally flipped MOSI and MISO when connecting the Tap, you can use this button instead of re-wiring.
TxRx
How does one signal to the generic TxRx formatter that a packet has ended and to emit current buffer.
Records are always written to the log immediately, i.e., when you call writer.write(...) or return false from the log.Converter.convert(...) method.
writer.write(...)
false
log.Converter.convert(...)
I assume, the question is how to prevent merging of Tx, Rx, or TxRx records. Then you do this by inserting a Break record where appropriate (e.g., instead of SpiStart records).
Tx
Rx
Break
SpiStart
They are not documented in a dedicated reference manual, but the code that defines all the related records and converts them into the visual representation you see on-screen is open-source.
Please see scripts/plugins/I2cSpiTap/I2cSpiTapLogRecordCode.jnc, scripts/plugins/I2cSpiTap/I2cSpiTapLogRepresenter.jnc
scripts/plugins/I2cSpiTap/I2cSpiTapLogRecordCode.jnc
scripts/plugins/I2cSpiTap/I2cSpiTapLogRepresenter.jnc
Thanks for the reply. It was hard to get started (ie I could have used a "top level" overview of how all the parts fit together), but IONinja is a very powerful tool.
Thanks for the log.StdRecordCode.Break info. I just skimmed over Break when examining the class thinking it had to do with a spacing async line. It is exactly the code I needed.
log.StdRecordCode.Break