不能to read DA14583 Internal Flash memory

7 posts / 0 new
Last post
jackiechau
Offline
Last seen:3年5个月前
Joined:2016-01-15 01:32
不能to read DA14583 Internal Flash memory

First I use SmartSnippets to burn 8 bytes of data into 0x8001 and verify the flash content by clicking read. Whatever I use the DA14580_beacon_3.40.6 or spi_flash of peripheral test projects, it's unable to read the flash content correctly by calling spi_flash_read_data(). It seems those 2 projects implementation based on 14580, right? Please kindly advise.

Device:
MT_dialog
Offline
Last seen:3 months 18 hours ago
Staff
Joined:2015-06-08 11:34
Hi jackiechau,

Hi jackiechau,

You are trying to read the data that you have inserted to your flash through the beacon reference design ? Regarding the beacon to read data from the flash it uses two headers, a product header and a configuration header, the product header instructs the program where the configuration header is located. Regarding the peripheral examples it erases the whole chip before the reading and writing procedures take place. Both projects are for the 580. Do you configure the proper GPIO pins in order correspond to the internal flash pins of the 583 ?

Thanks MT_dialog

jackiechau
Offline
Last seen:3年5个月前
Joined:2016-01-15 01:32
Hi MT_dialog,

Hi MT_dialog,

In peripheral examples, I have commented out to erase the whole chip. But may be I configure the GPIO incorrectly, would you please list down which I/O and its function to control the internal flash pins of 583, thanks.

MT_dialog
Offline
Last seen:3 months 18 hours ago
Staff
Joined:2015-06-08 11:34
Hi jackiechau,

Hi jackiechau,

The pins for controlling the internal flash of the 583 are P2_0/CLK - P2_3/CS - P2_4/MISO - P2_9MOSI, you can find them in the datasheet and at the user_periph_setup.h in the SDK projects except from the peripheral examples projects.

Thanks MT_dialog

jackiechau
Offline
Last seen:3年5个月前
Joined:2016-01-15 01:32
Hi MT_dialog,

Hi MT_dialog,

Thanks for your info, I have modified the peripheral examples and could read 16 bytes flash data at 0x8000 successfully in debug mode (Use JLink debugger). However, I burned the program image into flash and reset the board, it seemed the program halted and ran very slowly, then 16 bytes 0x00 were read. Those read data is incorrect and I have verified the flash data by using SmartSnippets. Then I added some printf debug message in the program and ran the program in standalone mode, the program seemed to be halted when starting to execute spi_flash_auto_detect(). Is there any problem when executing the program in flash and reading the flash data at the same time? If so, how to solve it, thanks.

MT_dialog
Offline
Last seen:3 months 18 hours ago
Staff
Joined:2015-06-08 11:34
Hi Jackiechau,

Hi Jackiechau,

There is no problem in burning an image in the flash and have some data in another lower part of the flash, to verify if any problem occurs i ve make some modifications in the barebone example in order to interact with the flash and print the readings, i burned some data with the Proprietary Header Programmer from smart snippets and placed the data in the 0x18000 address of the flash. I was able to read the data from flash and display them on a terminal without any delays. It sounds that your flash isn't accessible at all, do you invoke the release_from_power_down() function in order for your flash to wake up ? After booting from SPI the bootloader of the 583 it puts the flash in powerdown.

Thanks MT_dialog

jackiechau
Offline
Last seen:3年5个月前
Joined:2016-01-15 01:32
Hi MT_dialog,

Hi MT_dialog,

Problem is solved, thanks.

Topic locked