Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spiMaster.writeRead write buffer transaction limit #382

Closed
chrisws opened this issue Jun 5, 2024 · 6 comments
Closed

spiMaster.writeRead write buffer transaction limit #382

chrisws opened this issue Jun 5, 2024 · 6 comments

Comments

@chrisws
Copy link

chrisws commented Jun 5, 2024

Is it possible to increase the SpiMaster transaction limit from 64 to 255 (as per twi/i2c) ?

In firmware/app_layer_v1/spi.c the TX/RX buffers are 255 - so is the limitation just in IOIOProtocol.spiMasterRequest ?

This is to improve the refresh rate of an LCD where the read buffer is length 0.

@hannesa2
Copy link
Collaborator

hannesa2 commented Jun 5, 2024

Please make a pull request

@chrisws
Copy link
Author

chrisws commented Jun 5, 2024

Actually - I see now why there is a limit - with this:

writeByte((dataNeqTotal ? 0x80 : 0x00) | (resNeqTotal ? 0x40 : 0x00) | totalBytes - 1);

bit 7 + 8 are status bits, so there is only room for 6 bits to hold the length (63 max)

This corresponds to the SPI_DATA_ARGS definition in firmware/app_layer_v1/protocol_defs.h

So, it would require a firmware change to resolve. For an 128x128 16 bit color LCD the buffer size needs to be a lot larger. I was hoping there was a cheap, java side only fix to improve this. Oh well.

@chrisws chrisws closed this as completed Jun 6, 2024
@hannesa2
Copy link
Collaborator

hannesa2 commented Jun 7, 2024

So, it would require a firmware change to resolve.

I've no idea how to do this. But when you know more, we could do this, if we have the source of it

@chrisws
Copy link
Author

chrisws commented Jun 7, 2024

The source code for the firmware is in the repository, but I have no idea either.

Hopefully the original author(s) could help with some expert advice.

@hannesa2
Copy link
Collaborator

hannesa2 commented Jun 7, 2024

@ytai Maybe you know this ?

@hannesa2
Copy link
Collaborator

hannesa2 commented Jun 7, 2024

This is the current state #191 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants