你好,
We are working on a custom DA 14585 board. The board boots from flash, and since we are not using the default SPI pins, we have programmed the secondary bootloader into the OTP. The sleep mode is extended(without OTP copy). The issues we are facing is :
1.启用扩展睡眠的代码,当闪烁到HW中时,显示不一致的行为。它发布了一段时间,然后进入非响应状态。
2. The same code, with sleep disabled, when flashed into the hw, works fine
3.通过RAM运行时启用扩展睡眠的代码(使用Keil调试器),工作正常。
我们在我们的设计中包含32kHz和16MHz晶体。
什么可能是同样的原因?请建议。
Thanks
设备:
Hi wisilica,
I am not able to figure out anything obvious for that behaviour, i can mention a few things in order for you to test.
如果在闪存中刻录SDK项目并启动该项目,您可以看到相同的行为吗?你能估计设备广告的时间吗?我会假设该设备在睡眠中保持清醒和摊位的同时宣传,因此尝试从FW切换到RCX而不是XTAL32。您可以尝试使用默认引脚(可能在Dev套件上)从Flash启动FW)并检查是否有任何区别?
在这篇文章中,我也错过了一些关于从特定的SPI引脚启动的东西https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...在585中,除了从特定引脚启动的OTP中刻录的辅助引导加载程序外,585还包括一个机制,以便从特定引脚引导,这可以在OTP标题的引导特定映射字段中定义,您将能够找到附录G和4.3.1 OTP标题段落中的585的数据表中的信息,尽管我不认为您观察到的行为的原因是您在OTP中刻录了辅助引导加载程序。
谢谢mt_dialog.
你好,
感谢你的及时回复。我试过了你提到的事情,结果如下:
1.而不是我们的应用程序FW,我已经编写了鞍骨项目,默认睡眠模式选择了延伸到闪存中。该行为保持不变,即设备广告约3-4个分组,然后进入非响应状态。
2.还尝试将CFG_LP_CLK设置为LP_CLK_RCX20,但问题仍然存在。
3. Tried loading the firmware directly into RAM using booter, and then the device advertises properly.
4.在开发板中尝试了相同的固件(即SPI引脚的默认配置),设备工作正常。
我还配置了OTP标题,以便从SPI引脚引导如下:
SPI CLK = P0_0,SPI_EN = P0_1,SPI_DI = P0_2,SPI_DO = P0_3
boot =正常序列,唤醒命令代码= 00,串行速度选择0
配置中有什么不妥吗?
此外,在二级引导加载程序固件中,所做的唯一更改是定义SPI_FLASH_SUPPORTED和SUPPERT_AN_B_001,并根据我们的原理图配置SPI引脚。
请建议上述问题的原因。
Thanks
Hi wisilica,
由于您已表示从特定SPI引脚完成引导序列,则引导标志不应为0x00(正常序列)但0xAA(从特定位置的SPI端口引导)。此外,如果您已经刻录刻录,则OTP中的辅助引导加载程序仍将使用辅助引导程序和不是串行引导序列引导。但是,我不认为你使用的辅助引导加载程序的事实会导致无响应的行为,之后所有设备都启动和FW运行,所以只要您拥有延长的睡眠而不是(OTP_COPY_ON)设备保留FW。您也可以尝试调试此操作是通过调试器附加,以便意识到FW摊位的位置,并且在崩溃之前和之后监控电源,以便知道设备是否睡觉,而不是唤醒或者它陷入了断言。
谢谢mt_dialog.
你好,
通过通过调试器(RAM)运行FW,设备不会停止。我还通过Booter将FW直接加载到RAM中,并且它效果正常。只有在Flash启动时才出现问题。
Thanks
Hi wisilica,
What i ve proposed above is to attach the debbuger while the device has booted from flash and the issue has occured in order to try and check where exactly the device stalls and check if this will help debugging the issue (just boot wait for the insident to occur and then attach the debugger - In order to attach the debugger via Keil in the "Debug" tab remove the initialization file and then hit the settings button and uncheck the "Reset after Connect"). Since the device appears to stuck when the seconday bootloader runs, perhaps what you are experiencing is related to that fact, perhaps this is an issue of the secondary bootloader and after running from OTP it doesn't reset a register or something similar and when the device goes to sleep it stalls (although i ve tested running the secondary bootloader from RAM and the SPI pins configured like the case above and having the flash bunred with the ble_app_peripheral the device could directly boot from the SPI flash on the specified pins and run as it should, so again i am not able to connect the secondary bootloader with the fact that the device stalls). You should also try to burn the OTP header with the Boot specific mapping flag set to the pins that you would like and check if the device operates that way.
谢谢mt_dialog.
你好,
How do we attach the debugger to the board while it is running ? After re-powering the board, the device begin to boot from flash, and then after few seconds it halts. When do we need to start the debug session ? I suppose the debug session, dumps the firmware into RAM. So, how do we know the point where the code halts ?
Also, the Application programmed flags 1 and 2 are configured as YES, OTP DMA length as 1FC0 and SWD enable flag as JTAG enabled in the OTP header. The snapshot of the same is attached herewith(OTP header smart snippets). Kindly see if any configuration is missing.
此外,问题不会一致。在某些运行相同的固件中,未观察到该问题,设备正常工作。请暗示它的原因。
Thanks
Hi wisilica,
使用您使用的相同项目来构建已刻录到Flash的.hex文件,根据您通常执行的,从闪存启动设备,然后按照上面提供的指令,以防止Keil下载设备的图像并防止JTAG重置(要在“debug”选项卡中通过keil附加调试器,请删除初始化文件,然后点击设置按钮并取消选中“连接后的”重置“)。在这样做只是点击“开始/停止调试会话”而且您将能够附加到自定义板(在附加JTAG之前,您不应该重置设备,或者让Keiil为您做这一点,这就是您应该首先准备的原因上述设置然后启动过程,例如,当检查“连接后”时,jlink将重置设备。击中“停止”按钮以停止执行(或FW可能已停止)并在装配模式中检查如果设备粘在某个地方,您将能够看到此问题和通过地图文件,您将能够查看哪个功能停止了。
关于OTP的设置,since the device is able to boot properly from the SPI the mirroring procedure is ok, there is no need to program the OTP DMA as it is used only when the device switches off the sysram as well, so the OTP will have to know how much data to copy upon wake up (also the value that you have placed is for the 580 which has a smaller OTP, but in any case this should not have any effect to what you are experiencing). Anyway, also burned a 585 device with a secondary bootloader and booted from the indicated SPI pins, again the device is operating as it should with no issue.
If that issue doesn't happen consistently, does that mean that the issue is likely to occur even when the fw is downloded via JTAG ? So perhaps there is no connection between the issue and downloading via the flash ?
谢谢mt_dialog.
你好,
我们在直接将FW加载到RAM中,我们没有观察到这个问题。此外,在构建代码时,各种内存部分的大小如下:
程序尺寸:码= 20808 RO-DATA = 2892 RW-DATA = 600 ZI-DATA = 8400
这与问题有什么关系吗?
现在,单击“开始调试会话”选项卡,然后在停止它时,我无法查看“装配”窗口。有没有任何设置缺失?
Thanks
Hi wisilica,
What you be 've posted is just the size of the binary generated from keil, doesn't have to do anything on what you are experiencing. The values that you have posted is the size of the Code (20808) RO data (2892) is the size of constant data, RW data (600) are your variables and ZI data (8400) is the size of your zero initialized variables. Please check what i ve mentioned above and also give it a try with a simple BLE SDK example and check if the same issue occurs. Regarding the disassembly window, you will have to enable it in order to see the Disassembly window, just go in "View" and click on the "Disassenbly Window".
谢谢mt_dialog.
你好,
正如您所建议的那样,我尝试了BLE_APP_BAREBONE项目。我所做的唯一变更将默认休眠模式设置为ARCH_EXT_SLEEP_ON。即使在这种情况下,也观察到这个问题。
现在,重新重新计算机后从Flash启动后,并在单击“开始调试会话”选项卡后,显示“拆卸”窗口,并突出显示以下行(附加快照)。
这是什么意思 ?
Thanks
你好,
此外,我已经附上了鞍骨项目十六进制文件,使用中途粘在一起。所做的唯一变更是将睡眠模式设置为扩展。
Please try using the firmware I have shared, in a board which can boot from the pins I have described earlier.
CLK - P0_0,CS - P0_1,DI - P0_2,DO - P0_3
Thanks
从您所附加的Keil图像似乎没有停止(拆卸窗口中的指令指示设备正在从内存加载地址),我想如果您在附加时按“运行”按钮您可以运行代码。
您在拆卸窗口中看到的代码的部分是从睡眠中恢复后执行的指令,以便获取ARCH_RESUME_FROM_SLEEP()函数,这意味着设备不会停止,但代码继续执行,这是在哪里安装调试器时,设备将停止。因此,在我的角度来看,尽管您无法在空中看到设备,但该设备仍然运营。
因此,就我可以告诉设备正在运营,以及我们拥有的唯一线索是,当通过次级引导加载程序加载时,闪存后闪烁少数广告字符串,您无法再查看任何广告。下一步是检查设备的功耗,您可以从Pro套件中电源电源,并使用电源分布器来检查设备的功耗,这将告诉我们设备是否实际上Emmiting广告字符串和某种原因,另一侧的设备无法接收(例如,您的XTal16可能关闭,您的XTal16可能在同一频率下发送),或者由于某种原因它丢失了BLE事件并唤醒了如果没有执行广告(出于某种原因,它醒来时太晚并且堆栈取消了BLE活动),您是否正在执行任何温度测试,并且您获得该问题?您也可能想检查任何丢弃的电源。
测试了您已上传并从设备上从OTP引导中的烧焦的辅助引导加载程序从您所指示的引脚中进行的设备进行了测试,并使用无问题的FW正确启动的FW,我可以正确连接它,我想是什么you are experiencing is due to a h/w issue, and not due to the bootloader or the sw that the flash has.
最后它值得在不同的板上尝试这个,并使用“引导特定映射”字段而不是辅助引导加载程序。
谢谢mt_dialog.