This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3100: SPI communication to Host crashes during sending larger files with empty IRQ

Part Number: CC3100
Other Parts Discussed in Thread: TM4C1294KCPDT,

Hello Support Team,

we have identified an issue with large data transfer (send via Wifi).

This issue occurs in infrastructure mode (STA) and also in Adhoc mode while:
   - Transmits large file (>1MB) in 1024 Byte chunks over socket
   - then an 0 length IQR occurs between the blocks which are cleared by the driver
   - an interrupt occurs during DMA transfer and cannot served
   - chip hangs afterwards, not responding to any commands

How can an IRQ be initiated by the CC3100 an no reason for the interrupt will be provided - raw data in this case is 0xBF 0xDC 0xCD 0xAB 0x63 0x00 0x04 0x00 0x37 0x00 0x0B 0x00.

As far as we have analyzed it is nor clear how the flow control during transmit will be reported back to the Host controller.

Feedback urgently required!

-Juergen

  • Hi Juergen,

    Can you please provide some more information?

    • Which SDK example are you using?
    • What is the host MCU for your setup?
    • Does this only happen when sending large files >1MB?
    • What do you mean by 0 length IRQ?

    Regards,

    Charles O

  • Hello Charles,

    we are using a Tiva Controller - the TM4C1294KCPDT with FreeRTOS. We are reading data from a SD-Card and send them over the CC3100 using the DMA feature of the Tiva. 

    It does only happen on larger file sizes - as larger as faster the issue occures - the exact number I can't say at the moment.

    IRQ with Zero length means that the IRQ line is indicating an interrupt, but no byte with containing the reason has been provided.

    Smaller data sizes are working very nice and fast.

    So our problem is the missing flow control for sending data - do you have a description how it should work?

    Any recommendation what we could try to fond the root cause?

    Hope this helps and best regards,

    Juergen Maisel

  • Hi Juergen,

    The CC3100 is sending a dummy message which is expected.

    Can you try adding sending the message at a slower rate? Basically adding a little delay after each DMA transfer to see if that makes any difference?

    Regards,
    Charles O
  • Hello Charles,

    we did that already in different versions - the issue is it is not just a little constant (currently 2ms), but it stil does not cover the problem 100%. Making the delay larger brings the data rate further down which is not acceptable.

    This is why we are looking for a better solution with your help.

    The effective data rate you can achieve depends on the wireless link quality which can change due to nosier environment - hence the CC3100 needs more time to send out the data.

    Flow control is here the magic solution. Hve you been able to recreate the issue tranmitting larger data files?

    Best Regards,

    Juergen Maisel

    JM3 Engineering

    Grafing b. Munich

  • Hi,

    What is the data rate you are trying to implement?

    I believe the reason is cause of the problem is that the DMA data is being transferred to the buffer faster than the NWP can process. I recommend setting a little delay or pausing the DMA transfer for a bit after the dummy event is received, this should allow the NWP sometimes to empty the buffer .

    Regards,
    Charles O

  • Hello Charles,

    thanks for taking care of the issue. We did some more tests with little delays according to your ideas, but not very successful. We tried delays starting with 1ms up 100ms and even that did not

    resolve the issue. In addition for the appilaction it is not accepable to slow down that much. Target speed on SPI is 16 Mbit.

    But let's talk about items which lead us to the root cause of the issue:

    1.) CC3100 -  internal buffer size - how much is avaiable?

    2.) Proper implementation of flow control  - e.g. ACK at the end of the send command (which is the only command without an acknowledge)

    3.) Why does the CC3100 crash?

    4.) Workaround for not having the CC3100 crashing at input buffer overflow?

    5.) Is there an implicit indication on the protocoll to detect buffer full?

    Thanks in advance,

    Juergen

  • Unfortunately no feedback to our questions.

    It should have been easy for to answer the questions about the buffer size or the mechanism to control the data flow.

    Anyhow, we figured it out by reverse Engineering - now we can transmit up to 420 MByte/sec at 16 MHz SPI speed.

    - Juergen

  • Typo - speed is up to 420kByte/sec of course.