6 years, 8 months ago.

nRF51822/mbed2.0: Maximum SPI payload

Hi,

I am using mBed 2.0 (MBED_LIBRARY_VERSION 93 to be exact) to transfer data via SPI (slave operation) in NORDIC nRF51822 chip.

I've found the file spi_api.c with the following macro defined:

#define SPIS_MAX_MESSAGE_SIZE 32

which is later used to define the size of default tx/rx buffers and in MAXTX/MAXRX registers to set maximum amount of bytes that can be handled in a single transaction.

Do I understand correctly that any message longer than 32 bytes shall be capped? Can I change this macro to a greater value, or is it a physical max of nRF51 chip? It seems that MAXTX/MAXRX registers can handle up to 256 bytes in a single transaction...

Thanks for any help

Cheers

It seems that really is the problem: first 32 bytes received by SPI are correct, but next ones are rubbish. Any ideas if I can increase this number to, say, 64 bytes?

posted by Jakub K 30 Mar 2018
Be the first to answer this question.