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.

cc3000 patch programmer 1.10 problem

Hello!
I ported the host-driver (SP1.7) for the CC3000 module on the microcontroller LPC1765.


I try to burn SP1.10 and have problem with patch programmer 1.10.




Programm Patch Programmer IAR_DR_Patch stuck on write to nvmem Service Pack version P1.8.6.11 -  Driver patches

    while (ucStatus_Dr)
    {
             //writing driver patch to EEPRROM - PROTABLE CODE
                // Note that the array itself is changing between the different Service Packs    
             ucStatus_Dr = nvmem_write_patch(NVMEM_WLAN_DRIVER_SP_FILEID, drv_length, wlan_drv_patch);        
    }





function nvmem_write_patch return error code (0x04):




unsigned char nvmem_write_patch(unsigned long ulFileId, unsigned long spLength, const unsigned char *spData)
{
    unsigned char     status = 0;
    unsigned short    offset = 0;
    unsigned char*      spDataPtr = (unsigned char*)spData;

    while ((status == 0) && (spLength >= SP_PORTION_SIZE))
    {
        status = nvmem_write(ulFileId, SP_PORTION_SIZE, offset, spDataPtr);
        offset += SP_PORTION_SIZE;
        spLength -= SP_PORTION_SIZE;
        spDataPtr += SP_PORTION_SIZE;
    }

    if (status !=0)     <----- status = 0x04    ERROR
    {
        // NVMEM error occured
        return status;
    }

    if (spLength != 0)
    {
        // if reached here, a reminder is left
        status = nvmem_write(ulFileId, spLength, offset, spDataPtr);
    }

    return status;
}




Now TiWI-SL not work. What i can do with it?

  • I am also facing the same issue. Please reply what to do in this case ? I could go back and download patch for 1.5. But everytime it gets stuck while trying to update with patch 1.10.

  • I am also having a same problem, if some one has information about it, please reply

  •  I have encounted to this problem,  is it CC3000 bug .help me if one know that .

  • I got it working, See this
    http://e2e.ti.com/support/low_power_rf/f/851/p/248212/871639.aspx#871639

     

    You need to first program with 1.5 then need to update the FAT Table Contenet, after that you can program with 1.10 patch.

    All the best...

  • Thank you.
    I solved the problem by using the following code.

    int main()
    {
      initMCU();
     
      Delay( 1000ms );
     
      //-------------------------------------------------------------
      // WLAN On API Implementation
      wlan_init( CC3000_UsynchCallback, (tFWPatches )sendWLFWPatch,
               (tDriverPatches )sendDriverPatch,
               (tBootLoaderPatches)sendBootLoaderPatch,
               ReadWlanInterruptPin, WlanInterruptEnable,
               WlanInterruptDisable, WriteWlanPin);

      wlan_start(1);     <-------- IMPORTANT!!!   (usPatchesAvailableAtHost = 1)
     
      // Mask out all non-required events from CC3000
      wlan_set_event_mask(HCI_EVNT_WLAN_KEEPALIVE|
                          HCI_EVNT_WLAN_UNSOL_INIT|
                          HCI_EVNT_WLAN_ASYNC_PING_REPORT);
      //-------------------------------------------------------------
     
     
        //Flash SP1.5
        
            ucStatus_Dr = 1;
     
          while (ucStatus_Dr)
        {
              ucStatus_Dr = nvmem_write_patch(NVMEM_WLAN_DRIVER_SP_FILEID, drv_length_P1p5, wlan_drv_patch_P1p5);        
        }
     
            ucStatus_Dr = 1;
        
        while (ucStatus_Dr)
        {
              ucStatus_Dr = nvmem_write_patch(NVMEM_WLAN_FW_SP_FILEID, fw_length_P1p5, fw_patch_P1p5);        
        }
            
            wlan_stop();
          

        //loop
        while(1);
    }

  • Hi Victor Nixto,

    I am using LSR TIWI SL module with non TI micr. So could you please the code that you have to implemented. This will help for implementation.

    one quick what is the need to set for "usPatchesAvailableAtHost = 1".

    Thanks in Advance

    MUKU

  • Here is the answer of your query regarding usPatchAvaialableAtHost, I got this response from TI Employee :

    If you try and flash the SP and the TiWi-SL no longer boots successfully (patch may have gotten corrupted) you can use wlan_start(1) instead of wlan_start(0); wlan_start(1) functions tells the TiWi-SL to ignore the SP in the EEPROM because the host micro may load the patch instead. So if you brick the TiWi-SL by flashing a bad patch you can use wlan_start(1) to boot the module, flash the new SP, then go back to using wlan_start(0).

    Sample Code You can  the sample code available in TI website, I am also Using a non TI micro and that code works fine for me.

  • Hi,

    Thanks for ur reply. Can u share code for wireless module intilialization part and where u handling the data read & write.

  • Thanks for the explanation, Abhishek Bhadraja.
    I determined that it is necessary to establish usPatchesAvailableAtHost = 1 empirically. And it worked.

    Mukunthan KAndasamy, the sample code you can find on TI download page http://processors.wiki.ti.com/index.php/CC3000_Wi-Fi_Downloads#CC3000_Wi-Fi_Downloads

    My code above is part of the 1.10.1 patch programmer for the Stellaris Cortex M4. The main change in the code: using functions wlan_start (1) [in the TI example wlan_start (0)] to restore the service pack 1.5 and then burn firmware 1.10.1

  • Hi Victor,

    I am porting the patch updating to a different platform.

    I note that there appears to be two ways of doing this: using the NVRAM writes as you have done (which puts the patches into the EEPROM) and also to use the HCI routines that send a patch directly from the ost. Do you understand this to be correct?

    In TI's example code they also have fat write routines that presumably they used to test the I2C method of updating the eeprom - but those routines are not called from within the code.

    In your example you  have not saved the MAC address or other information as TI seems to say you need to do. I presume your code works okay?

    kind regards

    Ian.

  • Thank you for your answer. Ian.

    Yes, my code works okay.

    I am understand what can update firmware in two ways. But I`m didn`t try update using HCI routines.

    Ian Harris said:
    In your example you  have not saved the MAC address or other information as TI seems to say you need to do

    You are right. When burn firmware in module need save information from it. I did not save the information from the module because it has lost by a previous failed firmware

    After a successful update, I set the MAC address using the nvmem_set_mac_address() function.