Uploaded image for project: 'CIFX Toolkit'
  1. CIFX Toolkit
  2. NXDRVTKIT-163

Firmware/File download with netX 90 in Use Case B fails with large files

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: V2.8.1.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      SPCIOL IT3.1
    • Account:
      Software Driver Os operational (SDODRIVER)

      Description

      The problem occurs when doing a Firmware/File download via the maintenance firmware V2.3.0.0 in idle mode using a netX 90 with Use Case B. The download will fail with the erro code: 0x800C0019 - No packet available if the file is very large (e.g. 1 MB see attached fwupdate.zip).

      Investigations have shown that in this case, erasing the corresponding flash area for the download file takes longer than the default timeout (5 seconds) that is set.

      In the cifX toolkit, the timeout is set in the DEV_DownloadFile function in cifXDownload.c:

      int32_t DEV_DownloadFile(void*                 pvChannel,
                               uint32_t              ulChannel,
                               uint32_t              ulMailboxSize,
                               uint32_t              ulTransferType,
                               char*                 szFileName,
                               uint32_t              ulFileLength,
                               void*                 pvData,
                               PFN_TRANSFER_PACKET   pfnTransferPacket,
                               PFN_PROGRESS_CALLBACK pfnCallback,
                               PFN_RECV_PKT_CALLBACK pfnRecvPktCallback,
                               void*                 pvUser)
      {
       
      ...
      
        uint32_t   ulTransferTimeout   = CIFX_TO_SEND_PACKET; 
      
      ...
      
        /* Performce download */
        do
        {
          switch (ulState)
          {
            /* Send download request */
            case HIL_FILE_DOWNLOAD_REQ:
            {
              /* Validate filename length to fit mailbox/packet */
              uint32_t ulFileNameLength = min( ((uint32_t)OS_Strlen(szFileName) + 1),
                                                (ulMailboxSize - (uint32_t)sizeof(HIL_FILE_DOWNLOAD_REQ_T))); /*lint !e666 : function call OS_Strlen() */
      
              /
      
      ...
      
              /* Insert file name */
              (void)OS_Strncpy( pbCopyPtr, szFileName, ulCopySize);
      
              /* Transfer packet */
              lRet = pfnTransferPacket(pvChannel,
                                       &uSendPkt.tPacket,
                                       &uRecvPkt.tPacket,
                                       (uint32_t)sizeof(uRecvPkt.tPacket),
                                       ulTransferTimeout,
                                       pfnRecvPktCallback,
                                       pvUser);
      ...

      When testing the download with a higher ulTransferTimeout value, it worked.

        Attachments

          Expenses

            Activity

              Status Description

                People

                • Reporter:
                  Jknorr Jonas Knorr
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: