Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Wi-Fi Combo Forum Discussions

MaFa_974161
Level 5
Level 5
100 sign-ins 50 replies posted 50 questions asked

Hello.

We develop a board with the same processor in CYW943907AEVAL1F.

We mount CYPRESS S25FL064LABNFI010 instead of MX25L6433FZNI as FLASH.

 

I modify CYW943907AEVAL1F.mk row 62 from

GLOBAL_DEFINES += SFLASH_SUPPORT_MACRONIX_PARTS

to

GLOBAL_DEFINES += SFLASH_SUPPORT_CYPRESS_PARTS.

 

We used OLIMEX ARM-USB-TINY-H as programmer and I launch this make target 

 

"My project location"-CYW943907AEVAL1F download run JTAG=Olimex_ARM-USB-TINY-H

 

The debugger log says that's all it's OK but my APP doesn't start.

 

I try to modify sflash_write.c to execute this steps in order to understand if FLASH can be programmed properly: 

 

/* init */

if ( 0 != init_sflash( &sflash_handle, 0, SFLASH_WRITE_ALLOWED ))
{
DEBUG_PRINTF(( "init_sflash failed!\n" ));
return -1;
}

/* erase */

DEBUG_PRINTF(( "1. erase\n\n" ));

if ( 0 != sflash_chip_erase( &sflash_handle ))
{
DEBUG_PRINTF(( "sflash_chip_erase failed!\n" ));
return -1;
}

/* write */

int i = 0;

for(i=0;i<256;i++) data_transfer.data[i] = (uint8_t)(i&0xFF);

DEBUG_PRINTF(( "ADDRESS HEX\tWRITTEN HEX\tREAD HEX\n" ));

long j=0;
for(j=0;j<32768;j+=256)
{

/* write */

if ( 0 != sflash_write( &sflash_handle, j, &data_transfer.data[0], 256))
{
DEBUG_PRINTF(( "sflash_write failed!\n" ));
goto end_test;
}

(void) platform_watchdog_kick( );

/* read */

if ( 0 != sflash_read( &sflash_handle, j, &Rx_Buffer[0], 256))
{
DEBUG_PRINTF(( "sflash_read failed!\n" ));
goto end_test;
}

(void) platform_watchdog_kick( );

for(i=0;i<256;i++)
{
DEBUG_PRINTF(( "%08X\t\t%02X\t\t%02X", (int)(i+j), data_transfer.data[i]&0xFF, Rx_Buffer[i]&0xFF));
if((data_transfer.data[i]&0xFF) != (Rx_Buffer[i]&0xFF))
{
DEBUG_PRINTF(( "----> failed !"));
}

DEBUG_PRINTF(( "\n" ));
}
}

This test says that FLASH can be programmed in a properly way ... but I don't undestand why after programming FLASH 

the APP does'nt start.

 

Is there a kind who can help me?

0 Likes
4 Replies
Rakesh_BG
Moderator
Moderator
Moderator
100 replies posted 100 sign-ins 10 likes received

Hi @MaFa_974161 ,

Can you share the sflash debug logs.

Regards,

Rakesh B G

0 Likes
MaFa_974161
Level 5
Level 5
100 sign-ins 50 replies posted 50 questions asked

Here the Log with this defines enabled in sflash_write.c

 

68: #define DEBUG_PRINT
69: //#define WIPE_SFLASH
70: //#define TEST_SFLASH_WRITE
71: //#define TEST_SFLASH_READ
72: #define DEBUG_PRINT_READ_CONTENT
73: #define DEBUG_PRINT_VERIFY_READ_CONTENT

 

 

0 Likes
Rakesh_BG
Moderator
Moderator
Moderator
100 replies posted 100 sign-ins 10 likes received

Hi @MaFa_974161 ,

Can you define  TEST_SFLASH_WRITE and  TEST_SFLASH_READ to run testing without any other code changes.

Thanks,

Rakesh B G

0 Likes
Rakesh_BG
Moderator
Moderator
Moderator
100 replies posted 100 sign-ins 10 likes received

Hi ,

 

Thread was locked due to inactivity for long time, you can continue the discussion on the topic by opening a new thread with reference to the locked one. The continuous discussion in an inactive thread may mostly be unattended by community users.

 

Thanks and Regards,

Rakesh B G

Cypress Semiconductor Corporation

An Infineon Technologies Company

0 Likes