Hi dialog
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, OUTPUT, PID_SPI_DO, false );
GPIO_ConfigurePin( GPIO_PORT_0, GPIO_PIN_3, OUTPUT, 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);
/*
************************************************************************************
*主循环
************************************************************************************
*/
while(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中工作
If the code size is as mentioned below, Application image is not working in both RAM and FLASH.
项目规模:代码= 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
Program Size: Code=22868 RO-data=3220 RW-data=128 ZI-data=8008 (In uVision V5.17.0.0).
I will check as per your suggestion. Here doubt is, my application image is working RAM, why it is not working in the Flash.
是任何上下文将在那里。
Hi,
Is bootable selected when flashing the firmware into flash via SmartSnippets? Also, remember to do an erase before write.
Hi
我正在擦除,然后刻录应用程序图像。我只选择可启动..
嗨mahesh,
关于距离的例子中,我一直都在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.
Initial 5 to 6 cycles of reading (i.e. 1024 bytes reading from Flash), it is finishing quickly. But after that for every reading cycle it is taking approximately 10seconds. I am not getting Idea, why it is taking this much time to read 1024 bytes from Flash. This much time is taking only if the application image is programmed in Flash. In development mode , reading cycles are finishing very quickly. I am suspecting Boot loader code interference occurring in between. Please give idea to resolve this delay in reading cycle.
Hi,
We still need to narrow down the problem you met first.
从那些长期读数读数仍然正确的值读数仍然是预期的吗?
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.
And could you do successive reads with smaller chunks, say 512/256 bytes or etc., and see what the result is?
There's no particular limitations to SPI reads.
应用程序运行时,引导加载程序不存在。
Hi,
It is taking long-time as well as the read values not the expected one.
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,
This information help me a lot to identify the issue.
我尝试了“spi_flash_release_from_power_down()”功能但不起作用。后来我尝试了“spi_flash_enable()”功能,使用此功能,我能够正确读取特定于应用程序的数据。
Thank you very much for the information.
我需要一些关于我可以保持在内部闪存(可以工作)中的单个应用程序映像的最大大小的信息。这意味着我想知道应用程序大小限制。
嗨mahesh,
The maximum application that you burn in flash and run from the 580 depends on the 580 and not the flash. The limitation is the 42KB of Sysram available, in that you will have to calculate the exchanged memory the heaps etc, for more info about this please check the UM-B-011 Memory map and scatter file. Also be aware that keil has a 32K limitation with the evaluation licence.
谢谢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_ACTIVITY()" (i.e. in the I2C drive) for indefinite time. Any specific reason that the processor getting struck at the mentioned instruction.
请指导我解决这个问题。
嗨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.