Other Parts Discussed in Thread: UNIFLASH
hello,
I am using MX25R8035FM2IH0 flash for cc2652P module with zr sw ota client. i am using sdk 5.10. i am doing following steps.
1. erase the device using flash programmer 2 /uniflash.
2. program the bim_offchip_hex file which is compiled from ccs.
3. leds turn on after this.
4. program the zr sw ota client hex file which is compiled from ccs.
5. the code starts working.
6. then i just reset the device then the code stops working only bim is working.
futher when i debugged more i found an issue with the following .
static bool extFlashReadInfo(void)
{
int ret;
const uint8_t wbuf[] = { BLS_CODE_MDID, 0xFF, 0xFF, 0x00 };
extFlashSelect();
ret = bspSpiWrite(wbuf, sizeof(wbuf)); ...............................................// code failed here.
if (ret)
{
extFlashDeselect(); ..........................................// it goes here
return (false);
}
ret = bspSpiRead(infoBuf, sizeof(infoBuf)); .....................................// the infobuf filled with 0 value.
extFlashDeselect();
return (ret == 0);
}
static bool extFlashVerifyPart(void)
{
if (!extFlashReadInfo())
{
return (false);
}
pFlashInfo = flashInfo;
while (pFlashInfo->deviceSize > 0)
{
if (infoBuf[0] == pFlashInfo->manfId && infoBuf[1] == pFlashInfo->devId) ..//////////////////////failed here beacuse of infobuf consists 0 only.
{
break;
}
pFlashInfo++;
}
return (pFlashInfo->deviceSize > 0);
// return (0);
}
please guide me for this issue. also please tell about the following highlighted part.
int bspSpiWrite(const uint8_t *buf, size_t len)
{
while (len > 0)
{
uint32_t ul;
SSIDataPut(BLS_SPI_BASE, *buf);
ROM_SSIDataGet(BLS_SPI_BASE, &ul);
len--;
buf++;
}
return (0);
}
please guide.