This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unable to read/write NHET section registers

Hi there,

For some reasons, I cannot display or write to any NHET register. All NHET registers are displayed theirs contents as "0x00000000" in the debugger, line-by-line stepping write in debugger has no effect. PENA already set to 1. CPU running at 120 MHz, VCLK=8 MHz, VCLK2=60 MHz (NHET), Flash wait states set to 3 and pipeline mode enable in FRDCNTL.

All other peripherals/modules are correctly initialized, readable and writable, except the NHET, and the order is as follow in my code:

Can anyone help me out?

 

// copy code to NHET here
 
this->PBIST.RunTests(); 
this->VIM.Init();       
this->ESM.Init();       
this->GPIOA.Init();     
this->RTI.Init();       
this->DMA.Init();       
this->CRC.Init();       
this->ADC12.Init();     
this->GPIEXP.Init();    
this->EEPROM.Init();    
this->FPGA.Init();      
this->CAN.Init();       
this->NHET.Init();      
this->HTU.Init();   
    
EnableIrq();    
        
this->CCMR4F.RunTests();

 

 

  • Additionally, I can observe that the NHET is executing my code somehow, because if one of the 3 instructions has "irq=ON", the ISR is called but my application is stuck forever, because I cannot read the HETOFFx register to clear the corresponding interrupt source (it always returns zero).

    If I turn all "irq=OFF", my application runs correctly, but without HET.

     

    Reading HET Program RAM Base @ 0xFF460000 and HET registers starting @ 0xFFF7B800 all return "0x00000000".

     

    Nothing to do with the problem, but below is my HET initialization code (Protect Program field, Ignore Suspend = 0, NHET is master, Turn NHET on):

     

    HETPFR          = 0x00000200;
    HETPRY          = 0x00000001;
    HETINTENAS      = 0x00000001;
    HETREQENS       = 0x00000001;
    HETREQDS        = 0xFFFEFFFE;
    HETGCR          = 0x00050001;

     

    Thanks.

     

  • Chuck,

    VCLK2/VCLK frequency ratio needs to be an integer. can you try that

     

    Hercules forum support

    If a post answers your question, please mark it with the "verify answer" button.

  • Thanks Hari,

    You just saved my day.

    For other people looking for solution, please see TMS570 TRM para. 2.3 Clock Domains stated that:

     

    The GCM only supports integer ratios between VCLK_sys, VCLK2, and HCLK.

     

    Best regards,

    Chuck.