嗨对话团队,
目前,我正在尝试打开基于DA14695的定制板。当我在RAM模式下调试应用程序(我的应用程序,或者SDK中的任何应用程序)时,一切都很好。但是当我试图加载它到QSPI Flash时,我得到了这个消息
cli_programmer 1.26
版权所有(c) 2015-2019 Dialog雷竞技电竞平台 Semiconductor
使用Internal UartBoot.bin未指定引导加载程序文件
上传引导装载程序/应用程序可执行文件...
可执行上传。
写地址:0x00002000偏移量:00000000块大小:0x00002000
在那之后,它就固定下来了。我创建了flash驱动程序,如您的教程中所述,为我的主机配置重建了uartboot和cli_programmer (DA1469X-00_Release_static_linux),您能验证附件中的驱动程序和.xml吗?
/ ** * \ addtogroup PLA_BSP_SYSTEM * \ {* \ addtogroup PLA_MEMORY * * \ {* / / ** **************************************************************************************** * * @file qspi_adesto.h * * @brief QSPI flash driver for Adesto flashes - common code * **************************************************************************************** */ #ifndef _QSPI_ADESTO_H_ #define _QSPI_ADESTO_H_ #define ADESTO_ID 0x1F #include "qspi_common.h" #define AT25SL_WRITE_ENABLE 0x06 #define AT25SL_WRITE_ENABLE_FOR_VOLATILE 0x50 #define AT25SL_WRITE_DISABLE 0x04 #define AT25SL_READ_STATUS_REGISTER1 0x05 #define AT25SL_READ_STATUS_REGISTER2 0x35 #define AT25SL_WRITE_STATUS_REGISTER1 0x01 #define AT25SL_WRITE_STATUS_REGISTER2 0x31 #define AT25SL_READ_DATA 0x03 #define AT25SL_FAST_READ_DATA 0x0B #define AT25SL_PAGE_PROGRAM 0x02 #define AT25SL_ENABLE_QPI 0x38 #define AT25SL_BLOCK_ERASE_4KB 0x20 #define AT25SL_BLOCK_ERASE_32KB 0x52 #define AT25SL_BLOCK_ERASE_64KB 0xD8 #define AT25SL_CHIP_ERASE 0xC7 #define AT25SL_ERASE_PROGRAM_SUSPEND 0x75 #define AT25SL_ERASE_PROGRAM_RESUME 0x7A #define AT25SL_DEEP_POWER_DOWN 0xB9 #define AT25SL_RELEASE_DEEP_POWER_DOWN 0xAB #define AT25SL_READ_DEVICE_ID 0x90 #define AT25SL_READ_JEDEC_ID 0x9F #define AT25SL_RESET_ENABLE 0x66 #define AT25SL_RESET 0x99 #define AT25SL_ENTER_SECURED_OTP 0xB1 #define AT25SL_EXIT_SECURED_OTP 0xC1 #define AT25SL_READ_SECURITY_REG 0x2B #define AT25SL_WRITE_SECURITY_REG 0x2F #define AT25SL_READ_SFDP_REG 0x5A #define AT25SL_FAST_READ_DUAL_OUTPUT 0x3B #define AT25SL_FAST_READ_DUAL_IO 0xBB #define AT25SL_READ_DEVICE_ID_DUAL 0x92 #define AT25SL_FAST_READ_QUAD_OUTPUT 0x6B #define AT25SL_FAST_READ_QUAD_IO 0xEB #define AT25SL_QUAD_PAGE_PROGRAM 0x33 #define AT25SL_READ_QUAD_DEVICE_ID 0x94 #define AT25SL_WORD_READ_QUAD_IO 0xE7 #define AT25SL_SET_BURST_WITH_WRAP 0x77 #define AT25SL_WRITE_ENABLE_QPI 0x06 #define AT25SL_WRITE_ENABLE_FOR_VOLATILE_QPI 0x50 #define AT25SL_WRITE_DISABLE_QPI 0x04 #define AT25SL_READ_STATUS_REGISTER1_QPI 0x05 #define AT25SL_READ_STATUS_REGISTER2_QPI 0x35 #define AT25SL_WRITE_STATUS_REGISTER1_QPI 0x01 #define AT25SL_WRITE_STATUS_REGISTER2_QPI 0x31 #define AT25SL_FAST_READ_DATA_QPI 0x0B #define AT25SL_PAGE_PROGRAM_QPI 0x02 #define AT25SL_BLOCK_ERASE_4KB_QPI 0x20 #define AT25SL_BLOCK_ERASE_32KB_QPI 0x52 #define AT25SL_BLOCK_ERASE_64KB_QPI 0xD8 #define AT25SL_CHIP_ERASE_QPI 0xC7 #define AT25SL_ERASE_PROGRAM_SUSPEND_QPI 0x75 #define AT25SL_ERASE_PROGRAM_RESUME_QPI 0x7A #define AT25SL_DEEP_POWER_DOWN_QPI 0xB9 #define AT25SL_RELEASE_DEEP_POWER_DOWN_QPI 0xAB #define AT25SL_READ_DEVICE_ID_QPI 0x90 #define AT25SL_READ_JEDEC_ID_QPI 0x9F #define AT25SL_ENTER_SECURITY_QPI 0xB1 #define AT25SL_EXIT_SECURITY_QPI 0xC1 #define AT25SL_READ_SECURITY_REG_QPI 0x2B #define AT25SL_WRITE_SECURITY_REG_QPI 0x2F #define AT25SL_FAST_READ_QUAD_IO_QPI 0xEB #define AT25SL_RESET_ENABLE_QPI 0x66 #define AT25SL_RESET_QPI 0x99 #define AT25SL_DISABLE_QPI 0xFF #define AT25SL_BURST_READ_WITH_WRAP_QPI 0x0C #define AT25SL_SET_READ_PARAMETER_QPI 0xC0 #define AT25SL_QUAD_PAGE_PROGRAM_QPI 0x33 /* Suspend */ #define AT25SL_STATUS2_SUS_BIT 7 #define AT25SL_STATUS2_SUS_MASK (1 << AT25SL_STATUS2_SUS_BIT) /* QPI Enable */ #define AT25SL_STATUS2_QE_BIT 1 #define AT25SL_STATUS2_QE_MASK (1 << AT25SL_STATUS2_QE_BIT) // Flash power up/down timings #define AT25SL_POWER_DOWN_DELAY_US 3 #define AT25SL_RELEASE_POWER_DOWN_DELAY_US 3 #define AT25SL_POWER_UP_DELAY_US 10 #if (dg_configFLASH_POWER_OFF == 1) /** * \brief uCode for handling the QSPI FLASH activation from power off. */ /* * Not tested * * Delay 10usec * 0x01 // CMD_NBYTES = 0, CMD_TX_MD = 0 (Single), CMD_VALID = 1 * 0xA0 // CMD_WT_CNT_LS = 160 --> 10000 / 62.5 = 160 = 10usec * 0x00 // CMD_WT_CNT_MS = 0 * Exit from Fast Read mode * 0x09 // CMD_NBYTES = 1, CMD_TX_MD = 0 (Single), CMD_VALID = 1 * 0x00 // CMD_WT_CNT_LS = 0 * 0x00 // CMD_WT_CNT_MS = 0 * 0xFF // Enable Reset * (up to 16 words) */ const uint32_t at25sl_ucode_wakeup[] = { 0x09000001 | (((uint16_t)(AT25SL_POWER_UP_DELAY_US*1000/62.5) & 0xFFFF) << 8), 0x00FF0000, }; #elif (dg_configFLASH_POWER_DOWN == 1) /** * \brief uCode for handling the QSPI FLASH release from power-down. */ /* * Not tested * * 0x09 // CMD_NBYTES = 1, CMD_TX_MD = 0 (Single), CMD_VALID = 1 * 0x30 // CMD_WT_CNT_LS = 3000 / 62.5 = 48 // 3usec * 0x00 // CMD_WT_CNT_MS = 0 * 0xAB // Release Power Down * (up to 16 words) */ const uint32_t at25sl_ucode_wakeup[] = { 0xAB000009 | (((uint16_t)(AT25SL_RELEASE_POWER_DOWN_DELAY_US*1000/62.5) & 0xFFFF) << 8), }; #else /** * \brief uCode for handling the QSPI FLASH exit from the "Continuous Read Mode". */ /* * Not tested * * 0x25 // CMD_NBYTES = 4, CMD_TX_MD = 2 (Quad), CMD_VALID = 1 * 0x00 // CMD_WT_CNT_LS = 0 * 0x00 // CMD_WT_CNT_MS = 0 * 0x55 // Clocks 0-1 (A23-16) * 0x55 // Clocks 2-3 (A15-8) * 0x55 // Clocks 4-5 (A7-0) * 0x55 // Clocks 6-7 (M7-0) : M5-4 != '10' ==> Disable "Continuous Read Mode" * (up to 16 words) */ const uint32_t at25sl_ucode_wakeup[] = { 0x55000025, 0x00555555, }; #endif static bool flash_at25sl_is_suspended(HW_QSPIC_ID id); static void flash_at25sl_initialize(HW_QSPIC_ID id); /** * \brief Enable volatile writes to Status Register bits * \details When this command is issued, any writes to any of the Status Registers of the Flash are * done as volatile writes. This command is valid only when the Write Status Register command * follows. * * \param[in] id QSPI controller id * * \note This function blocks until the Flash has processed the command. */ __STATIC_FORCEINLINE __UNUSED void flash_at25sl_wre_volatile(HW_QSPIC_ID id) { uint8_t cmd[] = { AT25SL_WRITE_ENABLE_FOR_VOLATILE }; flash_write(id, cmd, 1); /* Verify */ while (flash_is_busy(id)); } __STATIC_FORCEINLINE uint8_t flash_at25sl_read_status_register_2(HW_QSPIC_ID id) { __DBG_QSPI_VOLATILE__ uint8_t status; uint8_t cmd[] = { AT25SL_READ_STATUS_REGISTER2 }; flash_transact(id, cmd, 1, &status, 1); return status; } /** * \brief Write the Status Register 2 of the Flash * * \param[in] id QSPI controller id * \param[in] value The value to be written. * * \note This function blocks until the Flash has processed the command. No verification that the * value has been actually written is done though. It is up to the caller to decide whether * such verification is needed or not and execute it on its own. */ __STATIC_FORCEINLINE void flash_at25sl_write_status_register_2(HW_QSPIC_ID id, uint8_t value) { uint8_t cmd[] = { AT25SL_WRITE_STATUS_REGISTER2, value }; flash_write(id, cmd, 2); /* Wait for the Flash to process the command */ while (flash_is_busy(id)); } __STATIC_FORCEINLINE void flash_at25sl_enable_quad_mode(HW_QSPIC_ID id) { uint8_t status; status = flash_at25sl_read_status_register_2(id); if (!(status & AT25SL_STATUS2_QE_MASK)) { flash_write_enable(id); flash_at25sl_write_status_register_2(id, status | AT25SL_STATUS2_QE_MASK); } } __RETAINED_CODE static bool flash_at25sl_is_suspended(HW_QSPIC_ID id) { __DBG_QSPI_VOLATILE__ uint8_t status; status = flash_at25sl_read_status_register_2(id); return (status & AT25SL_STATUS2_SUS_MASK) != 0; } __RETAINED_CODE static void flash_at25sl_initialize(HW_QSPIC_ID id) { flash_at25sl_enable_quad_mode(id); } #endif /* _QSPI_ADESTO_H_ */ /** * \} * \} */
/ ** * \ addtogroup PLA_BSP_SYSTEM * \ {* \ addtogroup PLA_MEMORY * * \ {* / / ** **************************************************************************************** * * @file qspi_at25sl321.h * * @brief QSPI flash driver for the Adesto AT25SL321 * * Copyright (C) 2017-2019 Dialog Semiconductor. * This computer program includes Confidential, Proprietary Information * of Dialog Semiconductor. All Rights Reserved. * **************************************************************************************** */ #ifndef _QSPI_AT25SL321_H_ #define _QSPI_AT25SL321_H_ #ifndef ADESTO_ID #define ADESTO_ID 0x1F #endif // Device type using command 0x9F #define AT25SL321 0x15 #ifndef AT25SL321_32Mb_SIZE #define AT25SL321_32Mb_SIZE 0x16 #endif #include "qspi_common.h" #include "sdk_defs.h" #include "qspi_adesto.h" static void flash_at25sl321_sys_clock_cfg(HW_QSPIC_ID id, sys_clk_t sys_clk); static uint8_t flash_at25sl321_get_dummy_bytes(HW_QSPIC_ID id); static const qspi_flash_config_t flash_at25sl321_config = { .manufacturer_id = ADESTO_ID, .device_type = AT25SL321, .device_density = AT25SL321_32Mb_SIZE, .is_suspended = flash_at25sl_is_suspended, .initialize = flash_at25sl_initialize, .sys_clk_cfg = flash_at25sl321_sys_clock_cfg, .get_dummy_bytes = flash_at25sl321_get_dummy_bytes, .break_seq_size = HW_QSPI_BREAK_SEQ_SIZE_2B, .address_size = HW_QSPI_ADDR_SIZE_24, .page_program_opcode = AT25SL_PAGE_PROGRAM, .page_qpi_program_opcode = AT25SL_PAGE_PROGRAM_QPI, .quad_page_program_address = false, .fast_read_opcode = AT25SL_FAST_READ_QUAD_IO, .erase_opcode = AT25SL_BLOCK_ERASE_4KB, .erase_suspend_opcode = AT25SL_ERASE_PROGRAM_SUSPEND, .erase_resume_opcode = AT25SL_ERASE_PROGRAM_RESUME, .read_erase_progress_opcode = AT25SL_READ_STATUS_REGISTER1, .erase_in_progress_bit = FLASH_STATUS_BUSY_BIT, .erase_in_progress_bit_high_level = true, .send_once = 1, .extra_byte = 0xA0, .ucode_wakeup = {at25sl_ucode_wakeup, sizeof(at25sl_ucode_wakeup)}, .power_down_delay = AT25SL_POWER_DOWN_DELAY_US, .release_power_down_delay = AT25SL_RELEASE_POWER_DOWN_DELAY_US, .power_up_delay = AT25SL_POWER_UP_DELAY_US, .is_ram = false, .qpi_mode = false, .enter_qpi_opcode = AT25SL_ENABLE_QPI, .memory_size = MEMORY_SIZE_32Mb, }; __RETAINED_CODE static void flash_at25sl321_sys_clock_cfg(HW_QSPIC_ID id, sys_clk_t sys_clk) { } __RETAINED_CODE static uint8_t flash_at25sl321_get_dummy_bytes(HW_QSPIC_ID id) { return 1; } #endif /* _QSPI_W32Q32FW_H_ */ /** * \} * \} */
<配置名称= “MX25U3235F”> 为0x400000 flash_size> 0xa8a500eb flash_burstcmda_reg_value> 0x00000066 flash_burstcmdb_reg_value> 0×01 0×40 0×07 flash_write_config_command> 配置> <配置名称= “W25Q32FW”> 为0x400000 flash_size> 0xa82000eb flash_burstcmda_reg_value> 0x00000066 flash_burstcmdb_reg_value> 0X31 0×02 0×07 flash_write_config_command> 配置> <配置名称=”GD25LE32 “> 为0x400000 flash_size> 0xa82000eb flash_burstcmda_reg_value> 0x00000066 flash_burstcmdb_reg_value> 0×01 0×00 0×02 0×07 flash_write_config_command> 配置> <配置名称=” AT25SL321" >为0x400000 flash_size> 0xa8a000eb FLAsh_burstcmda_reg_value> 0x00000066 flash_burstcmdb_reg_value> 0×01 0×00 0×02 0×07 flash_write_config_command> 配置> flash_configurations>
<?xml version = " 1.0 " encoding = " utf - 8 " ?< / > < program_qspi > < product_id > DA1469x-00 product_id > < product_header > < active_fw_image_address > 0 x2000 < / active_fw_image_address > < update_fw_image_address > 0 x2000 < / update_fw_image_address > < flash_name > AT25SL321 < / flash_name > < flash_size > 0 x400000 < / flash_size > < flash_burstcmda_reg_value > 0 xa8a500eb < / flash_burstcmda_reg_value >0x66 0x1 0x0 0x2 0x7
设备:

嗨aectaan,
非常感谢您在我们的公共蓝牙论坛上提出的问题,以及您使用我们的BLE解决方案。我已经在团队内部升级了你的问题,所以我一有最新消息就会回复你。请问你们有基于DA14695的产品吗?
谢谢,PM_DIALOG.
嗨pm_dialog,
是的,我们评估了DA14695 USB套件,决定用DA14695和SLG46826启动我们目前的项目
嗨aectaan,
感谢更新。如我之前的评论中所述,我在内部升级了您的问题。我会及时通知你的!
谢谢,PM_DIALOG.
嗨aectaan,
这是您的应用程序从RAM正确运行的正常行为,而没有任何问题。雷竞技安卓下载原因是因为只要从RAM从RAM执行固件时不使用闪光灯,只要没有/到闪存。但是,当在错误初始化的闪光灯上使用闪光灯操作时,它很可能无法正常工作。请在下面查看我的评论:
1] XML文件条目似乎是正确的,但我们不能保证它,因为我们现在无法测试它。通常,XML条目用于编写初始化使用的闪光灯所需的正确信息,在产品标题中,所以已经下载的固件将在启动时正确重新初始化闪光灯。
2]我们发现jedec_id读取信息被配置错误。
命令9Fh预期返回的字节数不正确。根据Flash datasheet,第12页命令9Fh返回Manufacturer ID (0x1F), Memory Type ID (0x42)和Capacity Type ID (0x16)。在25sl321.h文件中,设备ID(0x15)被用来代替内存类型ID(0x42)。这可能是因为Flash制造商似乎喜欢对同一件事情使用不同的措辞,这常常会给驱动程序开发者造成困惑。在Flash数据表的每个字段旁边,都提到了返回每个字节的指令。要做到这一点,需要做以下修改:
每当在引导期间使用flash_autodetect时,DA1469x设备将向闪存发出read jedec_id 9fh命令。如果返回的信息匹配驱动程序中定义的配置对象中使用的闪存值,则包含驱动程序,则识别闪光灯,并加载正确的配置。以这种方式,闪光灯被驾驶员的规格初始化。如果返回的信息与包含的驱动程序的任何信息不匹配,则设备将无法启动或操作。
通常,Uartboot默认使用FLASH_AUTODETECT,因此它将无法初始化和操作Flash。
3]根据数据表。我们还注意到使用了错误的Power Up Delay。
电源所需的时间直到设备准备接收命令的设备为1-10ms。每次使用DA1469X设备上电时使用此延迟以及每次必须启动闪光灯设备时。例如,如果在睡眠期间,开发人员选择闪光灯时醒来时闪烁会被驱动,它必须重新通电(例如,如果在CONFIG文件DG_CONFIGFLASH_POWER_OFF中定义并设置为1)。
为了安全起见,强烈建议使用最大延迟。在驱动程序中使用的值是10,但是驱动程序期望延迟的单位是μsec而不是msec。因此,根据我们的回顾,我们认为#define AT25SL_POWER_UP_DELAY_US的正确值应该是10000。
4] .quad_page_program_address flash_at25sl321_config结构的项目应设置为“true”。
地址以Quad模式发送,因此此字段的值应该是真的,以反映这一点。如果它被设置为“false”,那么它将尝试以单个模式发送地址,而是将以写入错误的地址。
5]在flash_at25sl321_get_dummy_bytes()函数返回值为1.根据数据表,它应该是2,除非在使用QPI模式时在80 MHz下运行并设置寄存器。我们怀疑应将返回值更改为设备的工作量以及2的值。
请尝试建议的更改,让我知道它是否正常工作。您的反馈将非常欢迎!
谢谢,PM_DIALOG.
谢谢你,PM_Dialog!
您的建议帮助很大:在应用到我的驱动程序后,我可以擦除FLASH。在那之后,我发现并修正了我的司机的另一个错误。现在,它是有效的!
问候,英国。
嗨egor,
谢谢你接受我的回答,很高兴你得到它的工作。是否有可能分享您在驾驶员中完成的其他修改?另外,除了擦除过程之外,您是否尝试从Flash执行固件?
任何其他的输入/评论/将是非常欢迎的!
谢谢,PM_DIALOG.
是的,我试图从闪存执行固件,没关系。
我连着.ZIP与整顿的qspi_at25sl321.h和flash_configurations.xml。我希望,这将是为其他客户很有帮助。
谢谢,Egor
嗨egor,
谢谢你的意见。如果您有任何其他问题,请培养新的论坛票。
谢谢,PM_DIALOG.