5 posts / 0 new
Last post
jet_hao
Offline
Last seen:2 years 12 months ago
加入:2016-06-17 06:51
NOR FLASH programming fail

Hi there,

We have two system with DA14580. The two systems are identical except SPI FLASH. One system uses a 1Mb macronix SOP SPI NOR, the other system uses a 2Mb macronix CSP SPI NOR. During SPI programming, the 1Mb system works fine. The 2Mb system failed. The electrical connection seems to be fine and parts also seem to be fine. Has anyone ever see this problem?

Thanks
Hao

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
Hi jet_hao,

Hi jet_hao,

If i understand correctly, you are trying to program the flash with Smart Snippets and the tool fails to program the 580, is that correct ? Smart Snippets doesn't support any kind of flash by default, when you hit the connect button when trying to program the flash there is a small fw that is downloaded into the 580 called flash_programmer.bin (or jtag_programmer). The source file of that program is located in the SDK folder in the utilities directory, you will have to add your flash's data in the program in the spi_flash.c/.h file (you will see on the top of the file all the info supported information for the default flashes). So add the flash info in source code, compile, and add the new .bin file into the Snippets directory (replace the old one - jtag_programmer).

Thanks MT_dialog

jet_hao
Offline
Last seen:2 years 12 months ago
加入:2016-06-17 06:51
Hi MT_dialog,

Hi MT_dialog,

Thanks a lot for the information. If I want to add support for extra SPI NOR, I assume I will need to add all the JDEC information? After I added new NOR FLASH information in spi_flash.c/.h file, do I need to do anything else to make smartsnippet recognize the FLASH?

Thanks
Hao

jet_hao
Offline
Last seen:2 years 12 months ago
加入:2016-06-17 06:51
I looked into the code, I

I looked into the code, I found the 1Mb MX25V1006E on supported list. The 2Mb NOR MX25R2035F I am trying to use is not on the list. I looked at the code and assume change following things in .h file.
#define SPI_FLASH_DEVICES_SUPPORTED_COUNT (5)

#define SPI_FLASH_DEVICE_INDEX_MX25R2035F 4
#define MX25R2035F_MAN_DEV_ID ???
#define MX25R2035F_JEDEC_ID ???
#define MX25R2035F_JEDEC_ID_MATCHING_BITMASK ???
#define MX25R2035F_TOTAL_FLASH_SIZE ???
#define MX25R2035F_PAGE_SIZE ???
#define MX25R2035F_MEM_PROT_BITMASK ???
#define MX25R2035F_MEM_PROT_NONE ???
#define MX25R2035F_MEM_PROT_ENTIRE_MEMORY_PROTECTED ???

And add following should do the trick?
const SPI_FLASH_DEVICE_PARAMETERS_BY_JEDEC_ID_t SPI_FLASH_KNOWN_DEVICES_PARAMETERS_LIST[] =
{
{W25X10_JEDEC_ID, W25X10_JEDEC_ID_MATCHING_BITMASK, W25X10_TOTAL_FLASH_SIZE, W25X10_PAGE_SIZE, W25x_MEM_PROT_BITMASK, W25x10_MEM_PROT_NONE},
{W25X20_JEDEC_ID, W25X20_JEDEC_ID_MATCHING_BITMASK, W25X20_TOTAL_FLASH_SIZE, W25X20_PAGE_SIZE, W25x_MEM_PROT_BITMASK, W25x20_MEM_PROT_NONE},
{AT25Dx011_JEDEC_ID, AT25Dx011_JEDEC_ID_MATCHING_BITMASK, AT25Dx011_TOTAL_FLASH_SIZE, AT25Dx011_PAGE_SIZE, AT25Dx011_MEM_PROT_BITMASK, AT25Dx011_MEM_PROT_NONE},
{MX25V1006E_JEDEC_ID, MX25V1006E_JEDEC_ID_MATCHING_BITMASK, MX25V1006E_TOTAL_FLASH_SIZE, MX25V1006E_PAGE_SIZE, MX25V1006E_MEM_PROT_BITMASK, MX25V1006E_MEM_PROT_NONE},
{MX25R2035F_JEDEC_ID, MX25R2035F_JEDEC_ID_MATCHING_BITMASK, MX25R2035F_TOTAL_FLASH_SIZE, MX25R2035F_PAGE_SIZE, MX25R2035F_MEM_PROT_BITMASK, MX25R2035F_MEM_PROT_NONE},
};

Do you happen to have any information about MX25R2035F?

Thanks
Hao

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
Hi jet_hao,

Hi jet_hao,

I dont have the exact info for this kind of flash but i suppose that one can find it in the datasheet. As far as i can remember, when using this kind of flash (MX25R2035F) and the 5.0.4 flash_programmer (included in the SDK 5.0.4) the default configuration should be ok for this kind of flash (when none of the supported ones are found the fw uses some default configuration which as far as i remember is ok for the type of flash you are using). If using the 5.0.3 SDK you can make the following changes and replace the file. Just go to the spi_flash.h and change this definition from #define MAX_READY_WAIT_COUNT 200000 to #define MAX_READY_WAIT_COUNT 2000000. This as far as i am aware should work with your flash.

Thanks MT_dialog