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.

RM48L952: Setting the Prescaler in HALCOGEN

Part Number: RM48L952
Other Parts Discussed in Thread: HALCOGEN

Hello,

Please help me understand how to use HET.

I read N2HET in Technical Reference Manual. And what I use is HALCOGEN and CCS.

In Technical Reference Manual, HR is 1~64 and LR is 1,2,4,8,16,32,64,128. 

However, HALCOGEN HET tab is set to 0~63(HR), 0~7(LR).

Why is the prescaler range 0-7(LR Prescaler) or 0-63(HR Prescaler)?

  • The LRP (loop resolution period) must be > all cycles used for executing the instruction in N2HET RAM. The LR=64 --> LRP=64*HRP, the N2HET code length can be up to 64-1 instructions (if instructions used only take 1 cycle).

    Why is the prescaler range 0-7(LR Prescaler) or 0-63(HR Prescaler)?

    Please see the Table 20-5. Prescale Factor Register Encoding in TRM:

  • Thank you for your quick reply.
    Can I ask you one more question?

    Het.h has a htNotification function. The explanation is written as below.
    /** @fn void hetNotification(hetBASE_t *het, uint32 offset)
    * @brief het interrupt callback
    * @param[in] het - Het module base address
    * - hetREG1: HET1 module base address pointer
    * - hetREG2: HET2 module base address pointer
    * @param[in] offset - het interrupt offset / Source number
    *
    * @note This function has to be provide by the user.
    *
    * This is a interrupt callback that is provided by the application and is call upon
    * an het interrupt. The parameter passed to the callback is a copy of the interrupt
    * offset register which is used to decode the interrupt source.

    void hetNotification(hetBASE_t *het, uint32 offset);
    Is there any explanation or example that is easy for me to understand?