You're definitely on the right track. 256 is the queue size, or the maximum
total outstanding bytes to send. Each individual message can be up to 64
bytes (with the unmodified firmware) in order to better facilitate
multiplexing messages together as opposed to hogging the communication
channel between the IOIO and the host with one kind of message.
What you probably forgot to change is the IOIO protocol. There's a 6-bit
length field:
https://github.com/ytai/ioio/blob/master/firmware/app_layer_v1/protocol_defs.h#L201

You can modify the protocol by making matching changes to protocol_defs.h,
protocol.c in firmware as well as IOIOProtocol.java.
Some (slightly outdated, but SPI is probably fine) protocol docs here:
https://docs.google.com/document/d/1pj3Mla2Yl_M6CFOZAJd6w8YAThxM76CtaDlXVK8LKAo/edit


On Tue, Jun 24, 2014 at 1:19 AM, A.G. <[email protected]> wrote:

> Hi,
>
> I am using SPI to transmit and receive data to a few chips and the
> communication with the Android device is over bluetooth. For my application
> I need to send and receive as many bytes as possible in one transaction but
> the SPI buffer size seems to be limited to 64 bytes. I also noticed that in
> the spi.c file the assigned buffer size is 256 bytes but only 64 bytes can
> be used in the Java code. Why is that?
>
> I tried modifying the firmware by decreasing the buffer size in UART and
> I2C since I have no use for them and increasing the SPI buffer size to a
> maximum of 834 bytes for both read and write in spi.c file and could
> successfully compile and write the firmware to the IOIO-OTG board. Although
> the application does not hang when 830 bytes is used, it does for some
> other values such as 128, 256 or 834 bytes. If any value greater than 64
> bytes is used, the bluetooth connection drops for a moment and logic
> analyzer shows only 64 bytes of data being transmitted.
>
> Am I on the right track here? Is there anything else that needs to be
> modified to increase the SPI buffer size?
>
> I appreciate your help,
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to