Skip to content

sam_e70b_xplained: failed to run test case tests/drivers/can/timing/drivers.can.timing #45012

@shaoanxli

Description

@shaoanxli

Describe the bug
The test case failed after commit id: 5961ad2<Assertion failed at WEST_TOPDIR/zephyr/tests/drivers/can/timing/src/main.c:194: test_timing_values: (sp_err >= 0 is false)>.The root cause is not clear yet.

To Reproduce
Steps to reproduce the behavior:

  1. source zephyr-env.sh
  2. west build -p always -b sam_e70b_xplained tests/drivers/can/timing
  3. Open another terminal and execute: picocom -b 115200 /dev/ttyACM0
  4. west flash
  5. See error
    or
  6. twister --device-testing --hardware-map $HOME/sam_e70b_xplained.file -T tests/drivers/can/timing -vv
  7. See error

Expected behavior
Test case should pass as expected.

Impact
The test case drivers.can.timing failed.

Logs and console output

DEBUG   - DEVICE: testing on device CAN_0
DEBUG   - DEVICE: Running test suite can_timing_tests
DEBUG   - DEVICE: ===================================================================
DEBUG   - DEVICE: START - test_set_timing_min
DEBUG   - DEVICE: PASS - test_set_timing_min in 0.1 seconds
DEBUG   - DEVICE: ===================================================================
DEBUG   - DEVICE: START - test_set_timing_max
DEBUG   - DEVICE: PASS - test_set_timing_max in 0.1 seconds
DEBUG   - DEVICE: ===================================================================
DEBUG   - DEVICE: START - test_timing
DEBUG   - DEVICE: testing bitrate 20000, sample point 87.5% (valid): prop_seg = 0, phase_seg1 = 130, phase_seg2 = 19, prescaler = 50 OK, sample point error 0.2%
DEBUG   - DEVICE: testing bitrate 50000, sample point 87.5% (valid): prop_seg = 0, phase_seg1 = 174, phase_seg2 = 25, prescaler = 15 OK, sample point error 0.0%
DEBUG   - DEVICE: testing bitrate 125000, sample point 87.5% (valid): prop_seg = 0, phase_seg1 = 209, phase_seg2 = 30, prescaler = 5 OK, sample point error 0.0%
DEBUG   - DEVICE: testing bitrate 250000, sample point 87.5% (valid): prop_seg = 0, phase_seg1 = 174, phase_seg2 = 25, prescaler = 3 OK, sample point error 0.0%
DEBUG   - DEVICE: testing bitrate 500000, sample point 87.5% (valid): prop_seg = 0, phase_seg1 = 130, phase_seg2 = 19, prescaler = 2 OK, sample point error 0.2%
DEBUG   - DEVICE: testing bitrate 800000, sample point 80.0% (valid):
DEBUG   - DEVICE: Assertion failed at WEST_TOPDIR/zephyr/tests/drivers/can/timing/src/main.c:194: test_timing_values: (sp_err >= 0 is false)
DEBUG   - DEVICE: unknown error -22
DEBUG   - DEVICE: FAIL - test_timing in 0.80 seconds
DEBUG   - DEVICE: ===================================================================
DEBUG   - DEVICE: START - test_timing_data
DEBUG   - DEVICE: testing bitrate 500000, sample point 87.5% (valid): prop_seg = 0, phase_seg1 = 25, phase_seg2 = 4, prescaler = 10 OK, sample point error 0.9%
DEBUG   - DEVICE: testing bitrate 1000000, sample point 87.5% (valid): prop_seg = 0, phase_seg1 = 25, phase_seg2 = 4, prescaler = 5 OK, sample point error 0.9%
DEBUG   - DEVICE: testing bitrate 500000, sample point 90.0% (valid): prop_seg = 0, phase_seg1 = 26, phase_seg2 = 3, prescaler = 10 OK, sample point error 0.0%
DEBUG   - DEVICE: testing bitrate 500000, sample point 80.0% (valid): prop_seg = 0, phase_seg1 = 23, phase_seg2 = 6, prescaler = 10 OK, sample point error 0.0%
DEBUG   - DEVICE: testing bitrate 500000, sample point 100.0% (invalid): OK
DEBUG   - DEVICE: testing bitrate 8000001, sample point 75.0% (invalid): OK
DEBUG   - DEVICE: PASS - test_timing_data in 0.60 seconds
DEBUG   - DEVICE: ===================================================================
DEBUG   - DEVICE: Test suite can_timing_tests failed.
DEBUG   - DEVICE: ===================================================================
DEBUG   - DEVICE: RunID: 3388c175cce6eae39d7aabc0b45b2cfc
DEBUG   - DEVICE: PROJECT EXECUTION FAILED
DEBUG   - run status: sam_e70_xplained/tests/drivers/can/timing/drivers.can.timing failed
INFO    - 1/1 sam_e70_xplained          tests/drivers/can/timing/drivers.can.timing        FAILED Failed (device 4.982s)

Environment :
OS: Linux,
Toolchain Zephyr SDK 0.13.2
Commit SHA or Version: 5961ad2

Metadata

Metadata

Labels

area: CANbugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions