Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BHI260 Upload Firmware to Flash - Not Booting from Flash

    BHI260 Upload Firmware to Flash - Not Booting from Flash

    meric
    New Poster

    Hi,

    We are using a custom board with BHI260. HOST_BOOT pin is connected to GND on the board. The 4mB flash is connected to QSPI pins of the sensor. I am using micropython and esp32 for I2C communication. I am trying to upload firmware to flash by using commands which are stated in the API and the datasheet. The firmware which I am uploading is Bosch_SHUTTLE_BHI260-flash.fw.

    I followed every step in BHY2-Sensor-API. I imitated the whole operation of bhy2_upload_firmware_to_flash_partly method on my setup. Status code returns STATUS_FLASH_WRITE_COMPLETE, but BHY2_REG_BOOT_STATUS doesn't return BST_HOST_FW_VERIFY_DONE bit as 1 at the end of the upload.

    Basically, I am sending every packet as following. Every packet has the same structure and the sector address field is being updated before sending the package.

    [i2c_address][register_address][command(2bytes)][length of payload(2 bytes)][flash address (4 bytes)][firmware part]
    First packet = [0x28][0x00] [0x05,0x00][0xCC, 0x00][0x84, 0x1F, 0x00, 0x00][200 bytes part of the firmware]

    When I use the upload to ram function command, boot status returns 0x31. It includes BST_HOST_FW_VERIFY_DONE.

    I attached logicdata to this post.

    Can you help me to solve this problem? How can I achieve the upload firmware to flash and boot from flash operations succesfully?

    Moreover, after upload, I am sending BHY2_CMD_BOOT_FLASH, BHY2_REG_CHAN_STATUS, and the status code field points to the error which is [Sensor error] Host Download Channel Empty. Can you tell me what it is supposed to mean?

    Best regards,

    Meric

    2 REPLIES 2

    BSTRobin
    Community Moderator
    Community Moderator

    Hello meric,

    Could you provide your schematic, then we review HW schematic first?

    I assume that you already reviewed the logicdata that I uploaded.

    Meanwhile, I solved the problem. After sending boot command, I am sending two additional bytes right now. It is solved in this way. The i2c data is as follows.

    [i2c_address][0x00][0x06][0x00][0x00][0x00]

    BR,

    Meric

     

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist