This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC2640R2F: CC2640R2F and MX25R8035F

Part Number: CC2640R2F

Tool/software: Code Composer Studio

Hi,

I made a PCB with CC2640R2F and MX25R8035F Flash ( the same used on the Texas demo board). I have 4 samples, and I tested my code on everyone (erase flash, write flash, read flash), and all is ok at first.

But after a few dozen of erase, write, read, one sample doesn't work.

I use the functions in ExtFlash.h script. 

When I run the ExtFlash_test all is ok, but when I run for example ExtFlash_erase the execution code is blocked. 

In particular, the ExtFlash_erase function recall ExtFlash_waitReady:

 

static int ExtFlash_waitReady(void)
{
const uint8_t wbuf[1] = { BLS_CODE_READ_STATUS };
int ret;

/* Throw away all garbage */
extFlashSelect();
Spi_flash();
extFlashDeselect();

for (;;)
{
uint8_t buf;

extFlashSelect();
Spi_write(wbuf, sizeof(wbuf));
ret = Spi_read(&buf,sizeof(buf));
extFlashDeselect();

if (ret)
{
/* Error */
return -2;
}
if (!(buf & BLS_STATUS_BIT_BUSY))
{

/* Now ready */
break;
}

}

return 0;
}


I noticed that the execution go in if (!(buf & BLS_STATUS_BIT_BUSY))  but don't return to ExtFlash_erase function.

Can you help me?

I heve use the ExtFlash_erase(0, 1048575) to erase all flash a few dozen times. Can this damaged the flash?

Thanks.

Best regards.

Giuseppe

  • To make sure that the problem is not SW related, what you please try and run nvs examples in the SDK and see if you see the same problems there.
    If you do, I would guess that the problem i HW related. You should then try to solder off the device on the board that is not working and replace it with another device to see if that fixes the problem.
    BR
    Siri
  • Hi,

    the same code works on the other PCB samples and it worked on this sample also.

    Thanks.

    Best regards

    Giuseppe

  • I understood that the code works on the 3 other samples and that it worked for a while and then stopped. That can either mean that

    a)
    the code is OK and there is something wrong with the device that is failing. This is why I suggested you to replace the failing device with a new chip

    b)
    There might be something wrong in the SW when it comes to for example timing. The timing could be marginal so that it sometimes works and sometimes not. This is why I asked you to test SW we have provided in the SDK

    Siri
  • I will close this thread due to lack of feedback. It will be re-opened if new information is posted.