嗨对话框
我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();
我nterface Settings in set_pad_functions() as follow:
GPIO_ConfigurePin( GPIO_PORT_0, GPIO_PIN_0, OUTPUT, 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);
/ *
************************************************************************************
* Main loop
************************************************************************************
*/
而(1)
{
}
我can't read the JEDEC_ID in function spi_flash_auto_detect().is that any incorrect .

Hi Lane,
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.
Thanks MT_dialog
Hi,
我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
我t 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).
Program Size: Code=19784 RO-data=3276 RW-data=80 ZI-data=8924
Case 2: Not working both in RAM as well as in FLASH
如果代码大小如下所述,则应用程序图像不在RAM和Flash中工作。
程序尺寸:CODE = 21612 RO-DATA = 3276 RW-DATA = 80 ZI-DATA = 9004
Please help me resolve the issue.
There is any memory constrains. How much memory of Primary and secondary boot loader codes will occupy in the RAM usage in DA14583.
Hi,
When downloading your firmware to flash via SmartSnippets, please make sure 'bootable' is selected. Or you could also enable the log printing by defining the macro CFG_PRINTF to see if the firmware executes successfully.
Hi,
我nstead 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.
Hi Mahesh,
There isn't any special code limitation in the 583, Its a bit weird for the code to run from SYSRAM (i suppose that you download it via keil) and not to work via the flash due to code size. I suppose that the code doesn't boot from the flash at all for some reason or in case you use sleep perhaps it doesn't ever wake up. Can check if you can boot via flash using the proximity example, its has larger code than your custom application (Code=23636 RO-data=3220 RW-data=128 ZI-data=8008). Also to check if your application boots properly and starts you can turn on that LED when the system starts in the periph_init function just to check if the application boots.
Thanks MT_dialog
Hi,
我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,为什么它不在闪存中工作。
is any context will be there like this.?
Hi,
通过SmartSnippet将固件闪烁到Flash时是可引导的选择?另外,请记得在写之前做一个擦除。
Hi
我am erasing and then burning the application image. I have selected bootable only..
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.
Thanks MT_dialog
Hi
我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).
Hi Mahesh,
There is no specific configuration to run a custom application from the SPI, all you need to do is to just burn the application, using smart snippets and tag the image as bootable when the SM ask you to. Since you are able to run other applications (reference designs, etc) through the SPI but not your custom application i suspect that the problem lies in your custom application code (when you say custom 1 and custom 2 i suppose that you mean the application profiles that are included in your custom code). Since you are interfacing with the SPI memory and it works over SRAM but not when booted via SPI i would suspect that something is wrong with the SPI access that your code does, you can try to remove the SPI access from your custom application and try to boot from SPI. Perhaps there is somekind of conflict with the application specific data that you mention, how those data are loaded to the SPI, via Smart Snippets and the propriety header programmer ? check the offset where those data are stored.
Thanks MT_dialog
Hi,
我am using Smart Snippet tool to write the application specific data in the Flash. I am writing Application specific data from 0x16000 location onwards.
Hi,
Whether I can keep the Application image and Application specific data in any of the memory regions apart from the internal Flash of the 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,
我们仍然需要缩小你第一次见到的问题。
我s value read from those long-time reads still correct as expected?
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.
And the bootloader does not exist when the application runs up.
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.
我tried to read 256 bytes in each iteration, but still I am getting all zeros.
Please help me to check the status of SPI CS pin, while reading the data from the internal Flash.
Hi Mahesh,
我t sounds like your SPI is in power down mode, are you re-enabling your SPI before start reading, do you invoke spi_flash_release_from_power_down(); in order to release the SPI from power down ? The secondary bootloader in the 583 OTP will power down the flash after booting. The CS pin is the 2_3 pin on the 583 chip.
Thanks MT_dialog
Hi,
此信息帮助我识别问题。
我tried "spi_flash_release_from_power_down()" function but not working. Later I tried "spi_flash_enable()" function, with this function I am able to read the application specific data correctly.
非常感谢你提供的信息。
我need some information regarding the Maximum size of single Application image I can keep in internal flash (which can work). That means I want know the Application size limitation.
Hi Mahesh,
在闪存中刻录并从580运行的最大应用程序取决于580而不是闪光灯。限制是42KB的Sysram可用,因为您必须计算堆等交换内存,有关此信息,请检查UM-B-011内存映射和分散文件。另请注意,与评估许可证有32K的限制。
Thanks MT_dialog
Hi,
我have taken BLE Peripheral code and edited. As of now I am able to use Write call back and Notify callback in the BLE peripheral. But I am not able to use read callback with the BLE peripheral code. Please give guidance where I can get the read callbacks. Which file and function, I need to use to access the Readcall back from the BLE client (i.e. Mobile device) to BLE Server (i.e. Dialog Semiconductors) development board.
Hi 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.
Thanks MT_dialog
Hi,
我am interfacing DA14583 with an I2C slave device. Some times I am able to read the data from the I2C slave device. But some times the Processing is getting struck at
“wait_until_no_master_actity()”(即在i2c驱动器中)无限期。处理器以提到的指示击中的任何具体原因。
Please guide me to resolve this issue.
Hi 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.