Booting from TIM instead of ROM


In the E21 UC subsystem, can we bypass the BootROM and directly boot from TIM?

I have tried to boot directly from TIM, but the interrupt handler registration is failing at metal_interrupt_register_vector_handler. The same code works fine when booting from BootROM.

Here is the code snippet:

s_cpu = metal_cpu_get(metal_cpu_get_current_hartid());
if (s_cpu == NULL) {
     return 2;

s_cpu_intr = metal_cpu_interrupt_controller(s_cpu);
if (s_cpu_intr == NULL) {
     //printf("Cpu interrupt controller failed");
     return 3;


sInterrupt = metal_interrupt_get_controller(METAL_CLIC_CONTROLLER,metal_cpu_get_current_hartid());
if(sInterrupt == NULL) {
	//printf("Get interrupt controller failed");


if(metal_interrupt_set_vector_mode(sInterrupt, METAL_SELECTIVE_VECTOR_MODE) != 0) {
	//printf("Set interrupt vector mode failed");
	return 4;

if(metal_interrupt_register_vector_handler(sInterrupt,I3C_INTERRUPT_ID,&i3c_slave_interrupt_handler,NULL) != 0) {
	//printf("Set interrupt register handler failed");
	return 5;

Any help in this regard would be very much appreciated.

Krishna B