嗨对话框
I used a external Flash W25x20 for Data storage,but when SPI Initialization is complete,I can‘t read the JEDEC_ID by “ jedec_id = spi_read_flash_jedec_id();” in function spi_flash_auto_detect();
Interface Settings in set_pad_functions() as follow:
gpio_configurepin(gpio_port_0,gpio_pin_0,输出,pid_spi_clk,false);
gpio_configurepin(gpio_port_0,gpio_pin_6,输出,pid_spi_do,false);
gpio_configurepin(gpio_port_0,gpio_pin_3,输出,pid_spi_en,true);
GPIO_ConfigurePin( GPIO_PORT_0, GPIO_PIN_5, INPUT, PID_SPI_DI, true );
And it initialization before main loop:
spi_flash_init(0x40000,0x100);
spi_flash_enable(gpio_port_0,gpio_pin_3);
/ *
************************************************************************************
*主循环
************************************************************************************
*/
而(1)
{
}
我无法读取函数spi_flash_auto_detect()中的jedec_id。是什么不正确。

嗨巷,
Please have a look at the spi_flash example in the peripheral_examples directory in the SDK5 to check how the JEDEC_ID is read from the spi_flash_auto_detect() function. The example code is able to read a W25X20 spi memory flash as is, without any modifications.
谢谢mt_dialog.
Hi,
I have taken the "ble_app_peripheral" example and done some changes in the code. As of now I am using Keil uVision V5.17.0.0 (trail version) and using SDK (DA14583)
Case 1: Working in RAM, but not working in FLASH
It is working fine in RAM (i.e. developing mode). If the same code I am downloading in FLASH by using "SmartSnippets" tool, it is not working. Even I couldn't able to see the BLE device name on the mobile side android app (while down loading the image in FLASH).
程序尺寸:CODE = 19784 RO-DATA = 3276 RW-DATA = 80 ZI-DATA = 8924
案例2:不在RAM和Flash中工作
如果代码大小如下所述,则应用程序图像不在RAM和Flash中工作。
程序尺寸:CODE = 21612 RO-DATA = 3276 RW-DATA = 80 ZI-DATA = 9004
请帮我解决这个问题。
There is any memory constrains. How much memory of Primary and secondary boot loader codes will occupy in the RAM usage in DA14583.
Hi,
通过SmartSnippet将固件下载到Flash时,请确保选择“可启动”。或者您还可以通过定义宏CFG_PrintF来启用日志打印,以查看固件是否成功执行。
Hi,
Instead of using CFG_PRINTF, I have used the LED indication on the Development boards. I have commented my code, put the LED related code in the BLE peripheral code. I have put the application image (having LED code+BLE peripheral code) in the flash. It is working in flash. If I am including my code (having My application code+LED code+BLE peripheral code), both together are working in RAM. But if the code (having My application code+LED code+BLE peripheral code) down loaded in the flash, then it is not working. Even LED blinking also not coming. I am suspecting the code size may creating an issue. I am following correct procedure and able to access the flash to write the application image. I am facing the issue with the higher size of code only. Please help to resolve the issue.
嗨mahesh,
在583中没有任何特殊的代码限制,它对于从Sysram运行的代码有点奇怪(我想通过keil下载它)而不是通过代码大小通过闪存工作。我想代码没有出于某种原因从闪存启动,或者如果您使用睡眠,它可能不会醒来。可以检查您是否可以使用Proximity示例通过Flash启动,其代码比自定义应用程序更大(代码= 23636 RO-DATA = 3220 RW-DATA = 128 ZI-DATA = 8008)。另外要检查应用程序启动是否正确并启动您可以在系统从PeripH_Init函数中启动时打开该LED,只需检查应用程序靴子。
谢谢mt_dialog.
Hi,
I tried with "prox_reporter" example. Prox_reporter in working in both RAM and Flash but the code size is
程序尺寸:Code = 22868 RO-DATA = 3220 RW-DATA = 128 ZI-DATA = 8008(在UVISION V5.17.0.0中)。
我会根据您的建议检查。这里怀疑是,我的应用程序图像是工作RAM,为什么它不在闪存中工作。
是任何上下文将在那里。
Hi,
通过SmartSnippet将固件闪烁到Flash时是可引导的选择?另外,请记得在写之前做一个擦除。
Hi
我正在擦除,然后刻录应用程序图像。我只选择可启动..
嗨mahesh,
Regarding the proximity example, i ve been looking in a modified proximity program that why my proximity code is larger, but even so the image is larger than the custom program that you are trying to download, so i dont think that there is an issue with the size. It must be something wrong with the application, in your custom code are you interfacing at all with the SPI ? Also please make sure that your code boots from the SPI, make sure that the program is downloaded in the 580 upon start up, try to check it with the LED in the peripheral initialization.
谢谢mt_dialog.
Hi
I have two custom applications (i.e. custom1 and custom2). In custom1, I am using SPI to get application specific data from the flash. In custom2, I am not using SPI at all. For both custom1 and custom2 applications, I am facing same issue (i.e. working in RAM (in development mode) and not working in Flash (i.e. run mode) ). Please give the information, what are the configurations I need to do, to run the application image in run mode (i.e. to boot from the flash memory).
嗨mahesh,
没有特定的配置来运行SPI的自定义应用程序,您需要做的就是只需刻录应用程序,使用智能片段并将图像标记为SM请求时可引导。由于您能够通过SPI运行其他应用程序(参考设计等)但不是您的自定雷竞技安卓下载义应用程序,我怀疑问题在于您的自定义应用程序代码(当您说自定义1和Custom 2时,我想您的意思是应用程序配置文件包含在您的自定义代码中)。由于您与SPI内存进行了接口,并且它在SRAM上工作,但在通过SPI启动时,我怀疑您的代码的SPI访问有问题,您可以尝试从自定义应用程序中删除SPI访问并尝试从spi启动。也许与您提到的应用程序特定数据有一些冲突,如何通过智能片段和总数标题程序员将这些数据加载到SPI的数据?检查存储这些数据的偏移量。
谢谢mt_dialog.
Hi,
我正在使用Smart Scippet工具在闪存中编写特定于应用程序的数据。我正在从0x16000位置写出特定于应用程序的数据。
Hi,
无论我是否可以将应用程序图像和应用程序特定数据保留在DA14583的内部闪光灯中的任何内存区域中。
Every time I am reading 1024 bytes of Application specific data from the Flash. Is any limitation in the size of data can be read from the flash at a time.
初始5到6个循环的读数(即,从闪存中读取的1024字节),它很快就完成。但是,在那个读取周期之后,它需要大约10秒。我不是想到的,为什么这是一个很多时间从闪存中读取1024个字节。只有在闪存中编程应用程序图像时,才会才能占用。在开发模式下,阅读周期很快就完成。我怀疑介于两者之间发生引导加载程序代码干扰。请告知想法在阅读周期中解决此延迟。
Hi,
我们仍然需要缩小你第一次见到的问题。
从那些长期读数读数仍然正确的值读数仍然是预期的吗?
What is the sleep setting in your project, ARCH_SLEEP_OFF, ARCH_EXT_SLEEP_ON or ARCH_DEEP_SLEEP_ON? Please use ARCH_SLEEP_OFF if not, just for simplifying the problem.
Could you also monitor the SPI CS pin? In the case of long-time reads, the SPI CS pin shall be observed staying low for long time.
你可以用较小的块做连续的读数,说512/256字节等,看看结果是什么?
There's no particular limitations to SPI reads.
应用程序运行时,引导加载程序不存在。
Hi,
它正在长时间以及读取值而不是预期的。
Sleep setting in our project is ARCH_SLEEP_OFF only.
How to observe the SPI CS status. To which pin I need to connect the CRO probe.
我试图在每次迭代中读取256个字节,但仍然我得到了所有的零。
Please help me to check the status of SPI CS pin, while reading the data from the internal Flash.
嗨mahesh,
它听起来像你的SPI处于电源下行模式,您是否在开始阅读前重新启用您的SPI,您是否调用SPI_FLASH_RELEASE_FROM_POWER_DOWN();为了将SPI从电源释放出来?583 OTP中的二级引导加载程序将在启动后关闭闪光灯。CS引脚是583芯片上的2_3引脚。
谢谢mt_dialog.
Hi,
此信息帮助我识别问题。
我尝试了“spi_flash_release_from_power_down()”功能但不起作用。后来我尝试了“spi_flash_enable()”功能,使用此功能,我能够正确读取特定于应用程序的数据。
非常感谢你提供的信息。
我需要一些关于我可以保持在内部闪存(可以工作)中的单个应用程序映像的最大大小的信息。这意味着我想知道应用程序大小限制。
嗨mahesh,
在闪存中刻录并从580运行的最大应用程序取决于580而不是闪光灯。限制是42KB的Sysram可用,因为您必须计算堆等交换内存,有关此信息,请检查UM-B-011内存映射和分散文件。另请注意,与评估许可证有32K的限制。
谢谢mt_dialog.
Hi,
我已经拍了BLE外围代码并编辑。截至目前,我能够在BLE外设中使用写回调并通知回调。但我无法使用带有BLE外围代码的读回调。请提供指导,我可以获得读回调。哪个文件和功能,我需要用来将从BLE客户端(即移动设备)的READCALL访问到BLE服务器(即对话框半导体)开发板。雷竞技电竞平台
嗨mahesh,
Read callback ? You mean a callback that will indicate that a client has read the data from the peer, this kind of handler doesn't exist, the indications that the client reads from your peer doesn't reach the application level.
谢谢mt_dialog.
Hi,
我用I2C从设备接口DA14583。有时我能够从I2C从设备读取数据。但是,有时候处理令人震惊
“wait_until_no_master_actity()”(即在i2c驱动器中)无限期。处理器以提到的指示击中的任何具体原因。
请指导我解决这个问题。
嗨mahesh,
could you create another thread for this i2c problem you met? It would be easier for forum users to search for similar topics. Thank you for your understanding.