1 2 Previous Next 18 Replies Latest reply on Oct 29, 2019 7:25 PM by GrLe_1336286

    Cypress API - Communication interruption of RS485 while programming PSOC5

    GrLe_1336286

      Hi All

       

      We have a control system with Coldfire processors remotely programming PSoC5LP devices.

       

      The hardware layer is RS485 over a twisted pair, braided shield (earthed), of up to several metres in length. There are numerous installations worldwide with very sound operation.

       

      For one installation the update of the PSoC is failing. This may be a hardware fault in one of the connections however it highlighted that there appears to be no communications timeout when the row programming is called (CyBtldr_ProgramRow). Therefore the host ends up hanging while trying to program the PSoC.

       

      For the Erase Row call, ERR_COMM is listed as a return.

       

      /*******************************************************************************
      * Function Name: CyBtldr_EraseRow
      ********************************************************************************
      * Summary:
      *   Erases a single row of flash data from the device.
      *
      * Parameters:
      *   arrayID – The flash array that is to have a row erased
      *   rowNum  – The row number within the array that is to be erased
      *
      * Returns:
      *   CYRET_SUCCESS    - The row was erased successfully
      *   CYRET_ERR_LENGTH - The result packet does not have enough data
      *   CYRET_ERR_DATA   - The result packet does not contain valid data
      *   CYRET_ERR_ARRAY  - The array is not valid for programming
      *   CYRET_ERR_ROW    - The array/row number is not valid for programming
      *   CYRET_ERR_BTLDR  - The bootloader experienced an error
      *   CYRET_ERR_COMM   - There was a communication error talking to the device
      *   CYRET_ERR_ACTIVE - The application is currently marked as active

       

      For the Program Row call there is no similar return. From debug on the Host device this appears to be the call which is hanging.

       

      /*******************************************************************************
      * Function Name: CyBtldr_ProgramRow
      ********************************************************************************
      * Summary:
      *   Sends a single row of data to the bootloader to be programmed into flash
      *
      * Parameters:
      *   arrayID – The flash array that is to be reprogrammed
      *   rowNum  – The row number within the array that is to be reprogrammed
      *   buf     – The buffer of data to program into the devices flash
      *   size    – The number of bytes in data that need to be sent to the bootloader
      *
      * Returns:
      *   CYRET_SUCCESS    - The row was programmed successfully
      *   CYRET_ERR_LENGTH - The result packet does not have enough data
      *   CYRET_ERR_DATA   - The result packet does not contain valid data
      *   CYRET_ERR_ARRAY  - The array is not valid for programming
      *   CYRET_ERR_ROW    - The array/row number is not valid for programming
      *   CYRET_ERR_BTLDR  - The bootloader experienced an error
      *   CYRET_ERR_ACTIVE - The application is currently marked as active

       

      Anyone have experience with a similar experience programming the PSoC from an external micro or similar device?

       

      Thanks in advance

      Greg

        1 2 Previous Next