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.

CC85XX EHIF boot_reset problem



Hi,

I have some trouble with EHIF BOOT_RESET function explained in CC85XX Family user's guide. Two methods mentioned in the documentation for BOOT_RESET function. Using SPI only & Using RSTn signal.

I use the function with RSTn signal method. My problem is;  i have always read status word as 0x8021 after and before the next command BL_UNLOCK_SPI  function. I tried several delays considering the time scaled waveform  about  BOOT_RESET() fn but nothing changed. In fact 0x8021 is a correct status word input to call UNLOCK_SPI function but I can't read the correct output 0x8020. I always read 0x8021.

Are there any pseudo code to explain the flow of the function.

  • Hi Metin, 

    The status output 0x8021 indicates that you successfully performed the BOOT_RESET() and the device is now waiting for the BL_UNLOCK_SPI() command.
    Are you sure you are issuing the BL_UNLOCK_SPI() command correctly with the 'magic' value 0x2505B007?  

    This is how we will issue the unlock command in a future EHIF library release we are working on:

    /** \brief Unlocks the SPI bootloader
    *
    * Bootloader unlocking shall be performed as the very first operation after BOOT_RESET. Otherwise, the
    * SPI bootloader will be locked and another BOOT_RESET is required to retry.
    *
    * \note This command is only available in bootloader mode.
    *
    * \return
    * One of the following:
    * - \ref EHIF_BL_SPI_LOADER_READY - Bootloader unlocking succeeded
    * - \ref EHIF_BL_SPI_LOADER_LOCKED - Bootloader unlocking failed. Make sure that
    * - Other: EHIF operation failed (CC85XX is not in bootloader mode, incorrect MCU clock speed,
    * CC85XX crystal problems etc.)
    */
    uint16_t ehifBlUnlockSpi(void) {

    // Prepare CMD_REQ parameters
    static const uint8_t pParams[4] = {
    0x25, 0x05, 0xB0, 0x07 // KEY
    };

    // Send BL_UNLOCK_SPI
    ehifCmdReq(0x00, sizeof(pParams), pParams);

    // Wait for completion and return status
    ehifWaitReadyMs(1);
    return ehifGetStatus();

    } // ehifBlUnlockSpi

    Best regards, 
    Kjetil 

     

  • Hi Kjetil,

    Sorry for late response,

    I solved my problem, you're totally right.

    My mistake is the command request. I didn't see the command request, I'm only send the magic value directly to the SPI like SYS_RESET.

    Thanks for reply,

    Metin