你好,
I'm trying to load the reporter application over a secondary bootloader via UART on a custom board. Everything works fine and I'm able to see advertising frames when loading the secondary bootloader via JTAG (ie no OTP burnt in the chip.).
Nevertheless after burning the bootloader into the OTP everything seems to works fine: bootloader starts, reporter application gets downloaded and starts. The thing is I don't get any advertising frame anymore. I'm pretty sure the reporter_fh application started to run properly as I get high current value at the expected interval (650ms but I also tried a longer interval and I could see the change). I can also see the 16Mhz quartz running at this interval as well. It's like I could not get any RF output or valid advertising frame anymore.
Another thing is that the reporter application does not work anymore when loaded via JTAG after the OTP was burnt, code does get loaded but when I stop the debugguer the application seem to freeze to 600µA.
我想报道,记者正在寻找OTP数据,如果没有正确设置它,它会破坏广告(甚至是JTAG加载的应用程序?),但我一直挖掘代码并找不到任何原因,因为看起来一切都是如此在编译时定义。我正在使用报道_FH示例,例如,只需将其从最后的SDK(3.0.6)与development_debug定义为1。
我用OTP完成了什么:
- burn secondary bootloader
- 阅读OTP标题
- 将应用程序标志设置为true
- set OTP remapped to 0
- set DMA size to 1FFF
- 烧伤标题
所以Usidid仍然是0并且启用了JTAG。我根本没有烧伤NVDS。
Thanks for your help.
Loic

嗨,嗨,
当你说不再获得广告时,你可以试图测试是否没有射频数据包或者只是发出错误的数据包?
And one more thing to clarify is where you put your reporter program? You said no nods.
Thank you!
问候!
PY
你好,
Thanks for your answer!
What I have is a secondary bootloader which looks for data over the UART and goes into deep sleep after a while if none received. So the application is copied into SysRam once downloaded exactly like in the secondary bootloader example. And of course I've got a micro into which I put a binary file as an array and which transfer the application over the UART.
总结:
da14580-01 (bootloader) <-----UART-----> Micro (reporter app)
- Bootloader从Retention RAM开始并运行
- bootloader receive the reporter app via the UART and copies it to Sysram
- Bootloader触发软复位
- reporter app starts
有关调试目的,我完成了以下所有过程:
- Micro waits for the bootlader
- 使用JTAG将引导加载程序复制到DA14580-01中
- 引导加载程序启动,复制报告器应用程序并触发软复位
- 广告框架正常
To do so I had to modify the bootloader scatter file in such a way:
lr_irom1 0x20000000 0x00008000 {;加载区域size_region.
ER_IROM1 0x20000000 0x00002000 { ; load address = execution address
*.o (RESET, +First)
*(Inroot $$部分)
startup_cmsdk_cm0.o.
system_cmsdk.o.
}
ER_IROM2 0x80000 0x2000 {
.ANY (+RO)
.ANY (+RW +ZI)
.any(堆栈)
}
}
然后我回到正常的分散文件:
LR_IROM1 0x00000000 0x00008000 { ; load region size_region
ER_IROM1 0x00000000 0x00002000 {;加载地址=执行地址
*.o (RESET, +First)
*(Inroot $$部分)
startup_cmsdk_cm0.o.
system_cmsdk.o.
}
ER_IROM2 0x80000 0x2000 {
.ANY (+RO)
.ANY (+RW +ZI)
.any(堆栈)
}
}
并如前一篇文章中所述刻录OTP中的引导加载程序。
最终我得到了:
- Micro waits for the bootlader
- 引导加载程序启动,复制报告器应用程序并触发软复位
- 广告框架Ko但消费好
I tried to see if there was any RF output but I need to be plugged into the RF analyzer to see it as the burst seems to be too short and not powerful enough to appear via the antenna. I'll try to add a connector on the board. As is said I'm sure the reporter application is running but it's like RF or advertising is broken.
What I found related to RF and avertising in the OTP is:
- Device unique ID (not burnt, advertising adress wrong?)
- 石英修剪(从芯片读取并烧伤,错误的频率?)
但是我不明白为什么会有差别eeing that I'm using the same reporter application as before burning the OTP which I believe is not reading any information from the OTP header anyway (let's hope I'm wrong here...).
希望它澄清整个问题。我会在星期一回答RF产出问题。
Thanks again for your help.
我检查了,根本没有RF输出。
评论以下行:
#define CFG_NVDS in da14580_config.h
in the reporter application was the answer. I guess I was indeed waking up on time but once in the app_adv_func function nothing was going on. Could you please further explain how this is related to the OTP though? I didn't burn this header but perhaps I should have?
Thanks for your help.
嗨,嗨,
It's good to know you find the answer. This can be explain.
因为报告管理程序将NVDS放在NVDS_DATA_STORAGE_AREA中,所以不会重新保留。因此,当您进入深度睡眠时,所有这些信息都将丢失。然后在app_adv_func时尝试检索这些信息时,您实际上得到所有0.所以BLE Kernal将停止发送非法广告。如果您注释出CFG_NVDS,那么它就没问题了。另一种选择是将NVDS信息放入报告应用程序中的保留内存。
const struct nvds_data_struct nvds_data_storage __attribute__((section("retention_mem_area0"))) = {...}
或者您也可以将NVDS表刻录到OTP,并且您需要处理您自己的内存分配。
Hope this helps!
问候!
PY
谢谢你的解释,这是有道理的!我不明白的最后一件事就是在使用JTAG时,应用程序正在运行的原因,因为CFG_NVDS仍然在时间定义?
问候
嗨,嗨,
是的,它是掌握的。我没有一个外部MCU以便在您的方式进行测试。我会看看更多的代码,看看我是否能找到你的答案。请先使用您的工作。如果你得到其他问题,请告诉我。
问候
PY
Well if you take the default reporter example and load it into a dev kit daughter board, it does work fine! CFG_NVDS is defined and OTP is not burnt.
If you can explain to me why this works then that's good enough :-).
Thanks
嗨,嗨,
I looked into the code and try some tests here.
1.默认Proxr项目以扩展睡眠模式运行,肯定可以使用CFG_NVDS定义,因为根本没有OTP镜像。
2. If the proxr project runs in deep sleep mode and also enable debug(DEVELOPMENT_DEBUG still be 1 as default), the code will also run with CFG_NVDS defined because the system ram in this setting will also be retained during sleep and the OTP mirror will not implement because OTP is empty..
3. If the proxr project runs in deep sleep mode and disable debug(DEVELOPMENT_DEBUG be 0), the code will have to run from OTP and that is not the case we are talking about.
So come back to your question, I will guess you compile your proxr code using the 2nd setting(you did not mention this details, but you said you use deep sleep and I would think the 3rd setting will not work in your case, neither put bootloader in OTP nor ram). Then if you use bootloader from ram to load proxr, the afterward scenario will just like the 2nd case above: OPT is empty and all code run from ram. If you burn bootloader into OTP and use bootloader to load proxr image into ram, then after sleep and wakeup, OTP controller will try to get information from OPT because OTP is not empty(bootloader inside), then will have some conflict. The only thing I'm still not sure is theoretically in your case the bootloader will be copied from OTP after BLE wakeup, then it should not run anymore. But I don't have your whole environment and can't repeat your issue.
我之前没有意识到以前的深度睡眠模式的设置是什么。如果你真的做了我猜到的(这不是深度睡眠模式,也没有延长睡眠模式),那么也许有潜在的风险。我想建议您在使用辅助引导程序时选择扩展睡眠模式。
希望这可以帮助你。
问候!
PY
你好,
我在闪光灯上刻录了OTP上的次级引导加载程序和刻录BLE_APP_PLEWELIAL项目。但我无法从我的手机搜索设备。
我前BLE仍然工作burn secondary bootloader. I followed the secondary bootloader document to do this. Is any setting I forgot? Thanks.
Hi Liang Yun Hao,
我想你不是在尝试做Suota过程,只需通过闪存中的次级映像启动,所以您在辅助引导加载程序中定义了support_an_b_001?由于您尝试从SPI启动的是启用SPI_FLASH_SUPPORTED?您是否将闪光灯中的图像标记为可引导,以便智能片段附加其他标题?您还可以通过将图像刻录到SPI闪存并通过efferic_bootloader项目下载并检查程序是否正确执行该过程来测试辅助引导加载程序。
Thansk mt_dialog.
嗨,DMA长度的推荐值是什么?谢谢。
Hi Liang Yun Hao,
You can place either the length of your image, or you can burn the field with the value 1FC0 meaning 32512 bytes in words.
谢谢mt_dialog.
好的。谢谢。