HAB Testing

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

HAB Testing

831件の閲覧回数
Shealtiel
Contributor II

I am using IMXRT1020 , I am trying to call the ROM HAB API's by assigning the address

location, but some how it is resulting to halt state and program getting stuck, I have added

the code by which I am trying to call ROM API, please suggest me what iam doing wrong in this case, I didn't enabled any fuses related to HAB, just trying to call HAB API and read version.

 

//uint32_t (*hab_entry)(void) = (uint32_t *)0x002002C0;

uint32_t (*hab_entry)(void) = (uint32_t (*)(void))0x002002C4;

//uint32_t (*hab_get_version)(void) = (uint32_t *)0x002002F0;

int main(void)

{

BOARD_ConfigMPU();

BOARD_InitBootPins();

BOARD_InitBootClocks();

BOARD_InitDebugConsole();

uint32_t hab_version = 0;

PRINTF("Initializing HAB\n");

hab_entry();

Delay(2000);

PRINTF("Get Hab Version called\n");

// hab_version = hab_get_version();

PRINTF("HAB Version [%X]\r\n",hab_version);

Delay(2000);

while(1);

0 件の賞賛
返信
1 返信

756件の閲覧回数
diego_charles
NXP TechSupport
NXP TechSupport

Hi @Shealtiel 

Thank you for your patience. 

I have been testing on my side. Initally I would think that issue is the HAB API three address that you where using, this is the one for RT1020, but it looks okay to me. 

#define HABRVT_API_TREE_ADDR (0x002002C0)

 

Without HAB enabled on the  i.MX RT1020 EVK I was able to call HAb entry and get HAB version without any faults. 

diego_charles_0-1720218816989.png

Here is  my source code. 

#include "hab.h"

PRINTF("\n\n\rCalling HAB entry...");
HabStatus = hab_Entry();
PRINTF("\n\rHAB Entry Status = ");
DUMP(&HabStatus,4);

uint32_t habversion;
habversion = hab_Get_version();
PRINTF("\r\n\n HAB version is =%X", habversion);

 You  can get the hab.h from the MCUXpresso SBL here , get and adapt these files for the RT1020 

diego_charles_1-1720219030005.png

 

diego_charles_2-1720219142389.png

My apologies for the delay. I hope at least this works as a reference. 

Diego

0 件の賞賛
返信