Hello,
I am using 5674 MCAL for development.
But, when I am checking the test case Can_TC_0023, there is a confusing that:
1. Call Can_Init().
2. Verification Point: (Interrupt mode == CAN_INTERRUPT_DISABLED) &
(IntDisableLevel == 0)
3. Call Can_DisableControllerInterrupts() for 5 times.
4. Verification Point: (Interrupt mode == CAN_INTERRUPT_DISABLED) &
(IntDisableLevel == 5)
5. Call Can_EnableControllerInterrupts() for 4 times.
6. Verification Point: (Interrupt mode == CAN_INTERRUPT_DISABLED) &
(IntDisableLevel == 1)
7. Call Can_EnableControllerInterrupts() for one more times.
8. Verification Point: (0 == Can_ControllerStatuses[can_controller].
s8IntDisableLevel) & (Interrupt mode == CAN_INTERRUPT_ENABLED)
The first step, Can_Init() will set Interrupt mode to CAN_INTERRUPT_ENABLED.
It's a legacy package so we couldn't check the database to find out the actual meaning of this. Nevertheless, Can_Init() shouldn't enable interrupt, and the interrupt should be enable in Can_EnableControllerInterrupts() (in the verification point from step 2, the interrupt mode is supposed to be disabled, which means in step 1, Can_Init() shall not enable the interrupt)
Best Regards,
Nam