Tool/software:
Hi, TI expert!
I have a development environment for am6234, with our own evaluation board.
The software SDK version is PROCESSOR-SDK-LINUX-RT-AM62X-08.06.00.42.
After referring to section “4.1 UART boot” in《AM62X_OTP_Keywriter_User_Guide_08_06_00.pdf》, I was able to properly burn certificates to efuse via uart.
But when I used IPC to load the firmware of Keywriter, the following error occurred:

The corresponding code implementation is as follows:
#include <stdint.h>
#include <drivers/sciclient.h>
#include <drivers/sciclient/include/tisci/security/tisci_keywriter.h>
#include "keycert.h"
/* Keywriter certificate */
const uint8_t gKeyCert[KEYCERT_SIZE_IN_BYTES] __attribute__((aligned(128)))
= KEYCERT;
void keywriter_processKeyConfig()
{
int32_t status = SystemP_SUCCESS;
Sciclient_ReqPrm_t reqParam;
Sciclient_RespPrm_t respParam;
struct tisci_msg_keywriter_req request;
struct tisci_msg_keywriter_resp response;
request.image_addr_lo = ((uint32_t) gKeyCert & 0xFFFFFFFFU);
request.image_addr_hi = ((uint32_t)(((uint64_t) gKeyCert) >> 32) & 0xFFFFFFFFU);
reqParam.messageType = (uint16_t) TISCI_MSG_KEY_WRITER;
reqParam.flags = (uint32_t) TISCI_MSG_FLAG_AOP;
reqParam.pReqPayload = (const uint8_t *) &request;
reqParam.reqPayloadSize = (uint32_t) sizeof (request);
reqParam.timeout = (uint32_t) SystemP_WAIT_FOREVER;
/* Populated by the API */
respParam.flags = 0U;
respParam.pRespPayload = (uint8_t *) &response;
respParam.respPayloadSize = (uint32_t) sizeof (response);
DebugP_log("keys Certificate found: 0x%x \r\n", (uint32_t) gKeyCert);
status = Sciclient_service(&reqParam, &respParam);
DebugP_log("Keywriter Debug Response:0x%x \r\n", (uint32_t) response.debug_response);
if (( status == SystemP_SUCCESS ) && ( response.debug_response == 0x0U ))
{
DebugP_log("Success Programming Keys \r\n");
}
else
{
DebugP_log("Error occured... \r\n");
}
DebugP_assertNoLog((status == SystemP_SUCCESS) && ((respParam.flags & TISCI_MSG_FLAG_ACK) == TISCI_MSG_FLAG_ACK));
}
int main()
{
System_init();
Drivers_open();
DebugP_log("\r\n\n");
DebugP_log("Starting Keywriting\r\n");
keywriter_processKeyConfig();
DebugP_log("Finishing Keywriting\r\n");
Drivers_close();
System_deinit();
return 0;
}
The code uses the tisci API interface of the keywriter to burn the certificate to efuse:
software-dl.ti.com/.../keywriter.html
Reference for loading Keywriter firmware use IPC:

I would like to ask what caused this failure and how to solve it?
Regards,
Li
