This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Extend the SPIS Buffer size larger than 256 Bytes to send larger packets

Hello,

I'm having some issues with the MAXCNT limitation of 256bytes because I want to send larger packets and receive packets through the SPI Slave interface, which is the best way to do this.

The packet I want to sent using the SPI Slave is larger than 13 KiloBytes, if the buffer is only 256 Bytes at most, which is the best way to send a packet of that size or larger using SPIS. I suppose I must rise the line on each transaction so the master knows when I want to send a block of data, if the limit is 256 should I sent the 13KB in small packets until the whole data comes out?. I saw there is a List solution somewhere, can you give me some example to take as reference for my project?

Regards,

Francisco Betancourt

  • Hi,

     

    I'm having some issues with the MAXCNT limitation of 256bytes because I want to send larger packets and receive packets through the SPI Slave interface, which is the best way to do this.

    The nRF52832 will have a limitation of receiving up to 255 bytes (MAXCNT is 8 bits wide). It is recommended that your master then re-initiates a SPI_Read in chunks of 255 bytes.

    Note: nRF52840 MAXCNT is 16-bit wide and nRF52810 MAXCNT is 10 bit wide. If your SPI Master cannot do SPI read in chunks, then using nRF52840 can be an option.

     

    I saw there is a List solution somewhere, can you give me some example to take as reference for my project?

    List is a feature in master peripherals like TWIM/SPIM. However; using this will not solve your buffering issue, as stated in the PS for array lists: 

    The Channel.MAXCNT register cannot be specified larger than the actual size of the buffer. If Channel.MAXCNT is specified larger than the size of the buffer, the EasyDMA channel may overflow the buffer.

     

    Best regards,

    Håkon

     

Related