我使用JTAG与DA14580连接,然后使用SmartSnippet OTP图像刻录自定义图像。然后刻录OTP标题,将2个标志设置为“是”,并将DMA长度编辑为我的代码长度。
我使用从内存中的读取来检查,操作是正确完成的。
But now I cant find my chip using my cellphone. I use booter to download firmware it still cannot be found.
有什么不对的吗?
Device:

Hi daniel,
如果您使用的是专业开发工具可以检查通过the power profiler if the device is actually advertising or not via the indicated power consumption. If you ve burned the application flags in the OTP you wont be able to download code via the UART or any other peripheral instead of the JTAG (since the bootloader is deactivated). So what you can do is to try and download code via the JTAG (hope you haven't disabled the JTAG in the OTP header) and check if the application responds.
谢谢mt_dialog.
是的,我通过JTAG下载代码,没有响应。
The code can work on the chip that haven't been burned, so the code is correct.
我需要在da1458x_config_basic和da1458x_config_advanced中更改什么?我只将cfg_development_debug更改为undef。
嗨Daniel59,
In the OTP header there is a flag named JTAG ENABLE if you have set this to disabled you wont be able to attach the debugger and download code to it, so if you haven't set this you should be able to attach the debugger and download code. In case you have the JTAG ENABLE flag enabled and you can't run or download code even with the debugger i suppose that something is wrong with the burned 580. There aren't any special setting to do with image, even with the CFG_DEVELOPMENT_DEBUG the image should work (the specific flag just adds some breakpoints in order for the developer to identify any problems, if you downloaded the image as is this shouldn't occur). Also try to re-attach to the OTP header and check if you can reburn the size of the DMA Length in order to make it bigger (the maximum value that this field can take is 1FC0 meanning 32512 bytes in words), perhaps you miscalculated the size of your image, and the DMA length should be larger or equal to the size of your image. Additionally make sure that the Remapping flag is set as SRAM at 0.
谢谢mt_dialog.
Yes the flag is Enable, and the DMA length I set is 0x1406 because when I burn DA14580, it says that DMA length (0 words) should not be smaller than the image file code length (5126 words).
在输入1FC0并刻录后,它会更改为1FE6。
附件是OTP报头图片,并通过Booter下载成功图片。但仍然无法通过手机找到。
嗨Daniel59,
If you burned the same chip you wont be able to reburn the OTP to the values you want, you can only switch from zeros to ones, thats why you got that value. Since you have the JTAG enabled you should be able to download code directly to the burned chip, if not by smart snippets at least by using keil, can you try that (download via keil) in order to make sure that the device is still working properly and that something went wrong with burning process. I had a test on an allready burned board with a DMA length over 1FC0 and placed the value that you mentioned (1FE6), seems that the mirroring is occuring just fine and the program runs, so, thats not your probelm. I suppose that something is wrong with the current 580 chip, although i insist on having your device on the power profiler and check what is it doing.
谢谢mt_dialog.
在将SW到JTAG更改后,我无法通过Keil找到芯片。我认为芯片很好,因为我仍然可以连接它。
如何使用Power Profiler检查芯片?
嗨Daniel59,
从SWD到JTAG的keil不改变,只需通过SWD将代码下载到芯片中,并检查您是否可以使用手机找到它。您将不得不使用Pro套件(仅限专家和Pro套件具有电源测量电路),您可以将Pro子板与Pro套件上的刻录OTP连接,并在Power Profiler选项卡中使用智能片段检查实际上,芯片没有宣传(检查系统广告时的三个电流峰值)。此外,您还可以检查重置后的当前消耗并检查是否有任何奇怪的行为。
谢谢mt_dialog.
我在keil中使用调试,并且可以将代码下载到芯片中。我可以看到Do ++操作的数据正常工作,但我的手机仍然无法找到。OTP NVDS是否需要燃烧?
I use DA14580 with my own circuit, so I cant use power profiler.
嗨Daniel59,
否,如果使用cfg_initialize_nvds_struct刻录图像,则NVDS结构将从SDK中填充数据,并且设备将使用这些数据作为BD地址等。如果您不使用此标志,则OTP的NVDS为空,然后是的,你会有一个问题。检查上面的标志并确保它定义了,如果从Keil您可以下载代码,您可以看到代码运行,但您无法通过手机看到您的设备广告,那么它不是OTP刻录其当前的580芯片或您的定制设计上的天线。
谢谢mt_dialog.
我检查了标志,定义了。
But before OTP burning the circuit can work, after burning it cant.
嗨Daniel59,
我很抱歉,但我不能针对任何损坏的580来确定问题,请尝试刻录另一个芯片。
谢谢mt_dialog.
我思考了......但是if it is damaged why Smartsnippet can connect to it? I'm afraid of damage another one...
嗨Daniel59,
Try to measure the voltage supply of the 580 (in case you are trying to power it via a coin cell battery), if the power is less that 2.35V the 580 wont boot from the OTP. Also regarding the fact that the 580 can connect to Smart Snippets and is not able to transmit, perhaps the radio of the module has been damaged or even perhaps the chip is transmitting but the antenna has been damaged in result the week signal that your device transmits can't be picked up by your phone device.
谢谢mt_dialog.
我发现问题在于代码。我下载一个未改变的模板十六进制文件到我的手机可以找到它,但下载我自己的代码我的手机不能。我会看我的代码并找出发生了什么。
我使用用户更改App_On_set_dev_config_complete回调,在其中添加2个简单的计时器。
void user_app_on_set_dev_config_complete(void)
{
data_used = app_easy_timer(8,app_data_timer_cb_handler);
timer_used = app_easy_timer(100,app_adcval1_timer_cb_handler);
default_app_on_set_dev_config_complete();
}
那么芯片无法找到。为什么会发生?OTP在运行app_on_set_dev_config_complete回调后有没有不同?
I want to know if I want the code run when the chip is powered, and only run one time, where should I place the code? Easy timer seems not work in the app_on_init callback. And if I put them in app_on_sytem_powered with an if statement I think it will waste some processing time.
我只是评论和取消注释2 timer callbacks and it can work on the OTPed chip...
嗨Daniel59,
There is no difference between the fw running on the OTP and while running on sysram, the callbacks and the functions executed are the one that you defined when building the code.
"Run the code when the chip is powered, and only run one time, where should i place the code", i am afraid that i dont understand what you would like to do, please clarify.
易于计时器在App_On_Init()中不起作用,因为在调用app_on_init回调之后,也调用了堆栈的重置,并取消了在app_on_init()期间设置的任何定时器。关于在app_on_system_powered()中的定时器设置()如果您不想在app_on_system_powered中放置if语句,则可以放置在_on_set_dev_config_complete()中的定时器设置(如您所做的),或者在开始通告时大多数SDK示例都执行,或者在完成在_app_on_db_init_complete()上设置数据库时。
谢谢mt_dialog.