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: CC3100 INTERFACED WITH STM32P107 Driver issues

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

Hi all,

    I have raised the error regarding wifi module cc3100modboost ,which Iam detailed explained in the below link

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1033531/cc3100-cc3100-wifi-module/3826487#

Unfortunately I clicked this resolved my issue,could anyone help in solving that error.

Finally the question asked was why the sl_start() returns the error code as ROLE_UNKNOWN,but  still sometimes the sl_start() returns the state as ROLE_STA(0).

Mainly the sl_SyncObjWait() returns SPI ABORTED which is under the function _SlDrvMsgReadCmdCtx.

Thanks and Regards,

Srigandeswaran S

  • You are not getting response to the command,

    It typically indicates issue with the SPI or the NWP interrupt.

    You'll need to monitor the hardware.

  • Hi kobi leibovitch,

              How to check it is a problem with the interrupt pin ,I have configured the interrupt pin and enabled it,but still the response from sl_start is either 0 or 1 means ROLE_STA or ROLE_UNKNOWN,what do you mean by monitoring the hardware,to monitor the UART data values?

    Thanks and Regards,

    Srigandeswaran S

  • yes, please check the UART lines.

  • Hi kobi leibovitch,

              I have checked the UART lines and data is transferring(Receiving some garbage data),and have further doubts in defining the definitions such as SL_TINY,SL_SMALL,SL_ FULL need to be defined or not?

    Thanks and Regards,

    Srigandeswaran S

  • do you see data sent and received on the UART? What do you mean garbage? can you send the actual bytes data that is transferred?.

    Don't use any of these defines.

  • Hi kobi leibovitch,

                 Garbage data means,whatever data Iam transferring Iam not getting it in the logic analyzer(output tool to see the data) is there any solution to solve that problem to receive the actual data bytes whatever Iam transfered?

    Is there any solution to solve the function _SlDrvIsTimeoutExpired(&TimeoutInfo) ,because the function returns error code that makes the device restart flag to set and returns SL_API_ABORTED

    Thanks and Regards,

    Srigandeswaran...

  • It seems that you have problems in the UART transmission and/or reception. I can't understand from you answer.

    The timeout happens because of the UART issue (the host sends a command or in sl_Start the host toggles the reset/nHib line, but doesn't read the expected results).

    You'll need to fix the UART port.

  • Hi kobi leibovitch,

                There is no problem with UART ports,UART transmit of data's without interrupt is happening and the data's are not received from the wifi module(UART RECEIVE) it get strucks at one function

    please I need to know whether is there any possibility to send any commands from any serial port tool like teraterm to the cc3100 wifi module?

    whether the hibernate pins need to be high when the UART DATA TRANSFER is happening?

    Thanks and Regards,

    Srigandeswaran.S

  • Are you using SPI or UART as the CC3100 host interface?

  • Hi kobi leibovitch,

               The Host interface is UART(as mentioned in previous posts you can see that)

    Thanks and Regards,

    Srigandeswaran.S

  • nHib line must be kept high (device can't go to hibernate) during the UART transfer.

    can you send the UART RX and TX data during the initi sequence? It definitely seems like a porting issue in regards to the uart. I'm not sure what do you mean by "data's are not received from the wifi module(UART RECEIVE) it get strucks at one function". Please explain in details what you see on the NWP input and output lines.

     

  • Hi kobi leibovitch,

              Sure,nHib line high will be taken care during UART data transfer,UART data Tx and RX during Init sequence are 0xff and 0xba.

    Data's are not received means,it never goes to the NWP_IF_READ_CHECK(Uart_Read) function which is present inside the _SlDrvMsgRead() function.

    Thanks and Regards,

    Srigandeswaran.S

  • so seems the UART RX is not functioning correctly (please check the UART line and the pin muxing on your host) - the NWP_IF_READ_CHECK used to verify data coming from the NWP.
    Does _SlDrvRxHdrRead returns successfully?

    Can you send a dump of the buffer received?  (uBuf.TempBuf)

  • Hi kobi leibovitch,

          It navigates inside the function _SlDrvMsgReadCmdCtx but  It doesn't goes inside the _SlDrvMsgRead function,where the _SlDrvRxHdrRead is present so the (uBuf.TempBuf) cannot be received.

    Pin muxing is what you mean the alternate functionality right?Pin muxing is correctly given in the host MCU.

    Thanks and Regards,

    Srigandeswaran S

  • ok, so if you are not ever start reading from the UART, then you should suspect the interrupt port.

    Are you getting to "_SlDrvRxIrqHandler"?.

    Where exactly the _SlDrvMsgReadCmdCtx stops?

  • Hi kobi leibovitch,
              Yes,its goes in to the _SlDrvRxIrqHandler for once,It goes in to the _SlDrvMsgReadCmdCtx function and it get strucks in to the _SlDriverHandleError function which is present inside it.

    sure,I will check the interrupt port,I have configured and enabled it other than that what need to be checked?

    Thanks and Regards,

    Srigandeswaran S

  • you need to verify that the interrupt handler is activated once for every command (check the RxIrqCnt and the g_pCB->RxDoneCnt values).

    Please provide the a logic analyzer capture of the init sequecne for the UART and interrupt lines.

  • Hi kobi leibovitch,
              Interrupt handler is activated only once,the count of RXIrqcnt and RXDonecnt are only 1,the count is not increasing not more than 1.

     UART(TX and RX) Init sequence of logic analyzer captures are attached below.I have maximized the first HEX command alone other commands you can see in right side of the image(terminal).

    Thanks and Regards,

    Srigandeswaran S

  • The 1 interrupt is probably for sl_Start, but then you get stuck on the next command.

    Maybe you are not clearing the interrupt?

    In which command are you getting stuck?

  • Hi kobi leibovitch,

         yes,the first interrupt is occuring during the sl_start(During registering the interrupt) in driver.c file in _SlDrvRxIrqHandler function.

    Interrupt is cleared everytime.

    It never goes to next command it gets struck after the sl_start command itself.

             
    Thanks and Regards,

    Srigandeswaran S

  • when registering the device - you should not get an interrupt.

    The first one is expected after the device is enabled.

    Have you gone through the hardware review process?  (https://www.ti.com/tool/SIMPLELINK-WIFI-DESIGN-REVIEWS)

  • Hi kobi leibovitch,

         While registering the device,only Rxirqcnt is made(No interrupt is got).The count is increased for the purpose of using in the _SlDrvMsgReadCmdCtx function, Yes the first one is expected after the device is enabled but no interrupt is received after the device is enabled.

    No,what is the use of going through the Hardware review process?

             
    Thanks and Regards,

    Srigandeswaran S

  • The Hardware review process can find hardware issues in your design.

    Currently, you  have some porting issue which can be related either to HW or SW. I'm trying to eliminate the HW issues.

    From the last answer - i'm not sure if you ever got any interrupt from the device.

    The sl_Start should turn the NWP on (changing reset/nHib state) and then device will wait for init completion interrupt and read the response.

    If you don't get the interrupt and try to read the response based on counter that was incremented by the SW - you'll have a problem.  

  • Hi kobi leibovitch,

            Sure,we will check the hardware review process,we are not getting interrupt from the device.

    The sl_start api turns on the device by enabling the Hibernate pin and the reset pin is also made high to avoid reset of module.

    yes,only if the interrupt(wifi_data)comes the count will be incremented and then only attempting to read the UART response using the _SlDrvMsgReadCmdCtx function.

             
    Thanks and Regards,

    Srigandeswaran S

  • I believe the interrupt line is not connected or configured correctly.

    The NWP seems to functional as we show it is sending some data over the UART (which looked real data) and there is nothing else that will prevent the interrupt.

  • Hi kobi leibovitch,

                  checked the interrupt line multiple times still the problem persists.Is there any other thing we can check related to usuage of any API's or define things in the code

             
    Thanks and Regards,

    Srigandeswaran S

  • can you share a logic analyzer capture that contains both the UART and the interrupt lines (as well as the reset/nHib line)?

    There is something very basic is that is not configured correctly.

    HW review as suggested before may help.

  • Hi kobi leibovitch,

                Sure,you can find the image which has UART TX ,UART RX ,Interrupt line, Status during the Device_Enable API function.

    I have configured all the required pins for the project.
    Thanks and Regards,

    Srigandeswaran S

  • i can see that you start reading before the interrupt line gets set.

    You should read more data after the existing byte.

    Please compare this sequence to the sequence in the working reference platform.

  • Hi kobi leibovitch,

               Yes the data is read before the IRQ line got high because there is a function called _SlDrvRxIrqHandler there registering the drive IRQ handler inside that there is a function called

    _SlDrvMsgReadSpawnCtx where we are trying to read the data once,the cc3100 driver code is written in that way

    I will check once that.


    Thanks and Regards,

    Srigandeswaran S

  • ok. Please compare to the reference platform.

  • Hi kobi leibovitch,

                     currently debugging the sl_start() function only,I suspect strongly the problem with the Interrupt handler function only,If you have any ideas of using the code without interrupt handler function please suggest me,i.e(3 wire protocol)      


    Thanks and Regards,

    Srigandeswaran S

  • Even the 3-w UART requires an interrupt but instead of using the HOST_IRQ (gpio), it will wait for the UART interrupt (i.e. _SlDrvRxIrqHandler() will be registered to the UART - see implementation of sl_IfRegIntHdlr).

    If this works better then the driver should be ok.

  • Hi kobi leibovitch,

                     Ok,will the sl_DrvIrqHandler() will accept the UART interrupt as host IRQ,how to link the UART interrupt IRQ to the SldrvirqHandler?


    Thanks and Regards,

    Srigandeswaran S

  • This is platform specific configuration.

    It depends on the host and OS you are using.

  • ok,I need to use the code without host interrupt line(HOST_IRQ) ,i.e four wire protocol (UART TX,RX,CTS,RTS) available in data sheet(CC3100mod).For that what are the changes need to be done in the code.

    Removed the HOST-IRQ line in hardware connection

    Iam using the STM32f1 as main module and cc3100mod as slave module and Iam using the non-os type in the code.

  • As mentioned you will need to register the interrupt handler.

    and you will not be able to put the host to sleep (as the UART must be able to receive w/o data loss).

  • Hi kobi leibovitch,

               The module sets up in AP mode,but there is an issue related to flashing of html pages in the cc3100boost board,the steps were done according to the steps mentioned in the uniflash document in MCU flashing section.

    Flashing of any HTML pages in the board displays only the default webpages,is there any steps you know that will be helpful for flashing the required HTML pages?

  • As this is not related to previous issue, please open this in a new thread.

    In general if the html pages are under the "www/" folder and the programming passed successfully (and of course the internal http server is enabled) - then they should be accessible.