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: Unit-testing of HAL generated by Halcogen

Part Number: RM48L952
Other Parts Discussed in Thread: HALCOGEN

Hi,

We are trying to get code coverage on the HAL generated by Halcogen and have some trouble getting full coverage on a few modules.
For example the INTOFFH register of ESM only has value description up to 0x60 (96 dec).


The code in esm.c checks if the reg value is <= 96.
So how can we cover the else-statement in that function? Can the INTOFFH register contain a value > 96?



Another module we have problems with is rti.c, we are trying to cover the fault-states of the DWD and DWWD watchdogs. We are trying to get into the marked if-statement below, but it's unclear from the reference manual what "Time_Window_Violation" actually means, it seems a bit ambiguous with the EndTime_Window_Violation?


Here's the register from reference manual (bit 5 is the "failure" mode we are not able to achieve).


We have tried to either kick the watchdog before the time-window, after it as well as using the wrong key. The three cases are setting bit 3, bit 1/4 and bit 2 respectively.


Hope my problem description is clear,

Best regards

  • Hi,

    I will check and come back to you. 

  • Hi,

    The code in esm.c checks if the reg value is <= 96.
    So how can we cover the else-statement in that function? Can the INTOFFH register contain a value > 96?

    >> The ESM offset registers include channels from error groups 1 and 2. The application can designate any of the group1 channels to generate a high-level or low-level ESM interrupt. Group2 channels always generate a high-level interrupt.

    >> As described in the reference manual:

    ESM offset values 1 through 32 indicate errors from group1 channels 0 to 31

    ESM offset values 33 through 64 indicate errors from group2 channels 0 to 31

    ESM offset values 65 through 96 indicate errors from group1 channels 32 to 63

    ESM offset values higher than 96 are not feasible and should be treated as a fault within the ESM module.

    Another module we have problems with is rti.c, we are trying to cover the fault-states of the DWD and DWWD watchdogs. We are trying to get into the marked if-statement below, but it's unclear from the reference manual what "Time_Window_Violation" actually means, it seems a bit ambiguous with the EndTime_Window_Violation?

    We have tried to either kick the watchdog before the time-window, after it as well as using the wrong key. The three cases are setting bit 3, bit 1/4 and bit 2 respectively.

    Bit 5 DWWD ST is expected to be set for any violation of the windowed watchdog time window. Bits 4(or 1), 3 and 2 provide more specific information about the violation that occurred.