SPI falls in hardware mode

I use module MC60 with firmware MC60CAR01A13 and OpenCPU v 1.7.
In my case, I observe the SPI module is not working properly.

My program needs to read data from the flash and transfer it to a remote server through socket connection. A serious problem occurs when I transfer more than 256 bytes to a socket connection at a time. In this case, the SPI configured in the hardware mode falls and no read more data from flash.
If i configure SPI in simulation mode - еverything is working correctly. But in this mode the speed of reading on the SPI bus is slow and my program loses in performance.

Please help me deal with this problem.

Hi, I’m not sure what the meaning of “the SPI configured in the hardware mode falls” is,Can you describe it in more detail?

In meaning of “the SPI configured in the hardware mode falls” - no activity on SPI bus. No chip sellect activity, no clk and other.

I wrote a test. One function reads data over the SPI bus. Another function sends data to the socket.

In first I enable the SPI.

  1. Then I read the data from flash.
    And in buff - data from flash is OK.
    The length of buff = 255.

  2. In active and connected socket - Ql_SOC_Send(sock_num, buff, 255)

  3. Data is Ok on server side.

  4. I repeat everything from point 2. Everything is correct. Data from the flash drive is read correctly when the address is incremented and sent to the server.

I modify the test.

  1. I repeat point 2 twice so that there is twice as much data in the buffer. The length of buff = 512,
    all data from the flash drive was read correctly
  2. I change in sock send func the length from 255 to 512. Ql_SOC_Send(sock_num, buff, 512)…
  3. Data is Ok on server side.
  4. But when I repeat step 1 - in my buff no more data from flash…on SPI bus no activity. The Ql_SPI_WriteRead() return = 512 but no data in buff .