Hi
Please refer the forum link asking question is continuation of this,
SDK Using for FW upgrade : ti154stack_linux_x64_4_40_00_03
example code using : cc13xx-sbl
OD Platform : Linux Ubuntu
Interface : UART
Chipset : CC2652R7
Host to upgrade the FW : Linux platform processor
Client to download the FW : CC2652R7 chipset
On MCU side We are using DIO2 as Rx and DIO3 as Tx. HW connection was proper. When we are trying to upload a FW from Linux processor to MCU we are receiving a NACK for Erase itself as shown in below image,
As shown in the image we are always receiving 51(Hex : 0x33) for erasing itself. Not even once we are able to upgrade it
What might be the reason for this ? Please explain here
Program flow on Error detecting place in "cc13xx-sbl" code :
main -> eraseFlash -> eraseFlash -> CcDnld_flashEraseRange -> getCmdResponse(&devAck)
CcDnld_flashEraseRange function defenition :
CcDnld_Status CcDnld_flashEraseRange(uint32_t startAddress, uint32_t byteCount, char * deviceType)
{
uint8_t eraseAddress[4];
uint32_t pageIdx;
uint32_t pageCount;
uint32_t retCode = CcDnld_Status_Success;
CcDnld_Dev_Ack devAck;
uint8_t devStatus;
uint32_t pageSize = CcDnld_getPageSize(deviceType);
pageCount = byteCount / pageSize;
if(byteCount % pageSize) pageCount ++;
for(pageIdx = 0; pageIdx < pageCount; pageIdx++)
{
/* Build payload - 4B address (MSB first) */
ui32ToByteArray(startAddress + pageIdx*(pageSize), &eraseAddress[0]);
/* Send command */
if((retCode = sendCmd(CCDNLD_CMD_SECTOR_ERASE, eraseAddress, 4)) != CcDnld_Status_Success)
{
printf("E sndCmd %d \r\n", retCode);
return retCode;
}
/* Receive command response (ACK/NAK) */
if((retCode = getCmdResponse(&devAck)) != CcDnld_Status_Success)
{
printf("E GetResp %d \r\n", retCode);
return retCode;
}
if(devAck != CCDNLD_DEVICE_ACK)
{
printf("E devAck %d \r\n", devAck);
return CcDnld_Status_Cmd_Error;
}
/* Check device status (Flash failed if page(s) locked) */
readStatus(&devStatus);
if(devStatus != CCDNLD_CMD_RET_SUCCESS)
{
printf("E devSts %d \r\n", devStatus);
return CcDnld_Status_State_Error;
}
}
return retCode;
}