zephyr: sam_e70b_xplained: failed to run test case tests/drivers/can/timing/drivers.can.timing
Describe the bug The test case failed after commit id: 5961ad2af8f3<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:
- source zephyr-env.sh
- west build -p always -b sam_e70b_xplained tests/drivers/can/timing
- Open another terminal and execute: picocom -b 115200 /dev/ttyACM0
- west flash
- See error or
- twister --device-testing --hardware-map $HOME/sam_e70b_xplained.file -T tests/drivers/can/timing -vv
- 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: 5961ad2af8f3
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (19 by maintainers)
Commits related to this issue
- drivers: can: sam: use UPLL clock instead of PLLA clock Use the UPLLCK clock for the CAN controller as recommended by the Atmel SAM E70 data sheet. Move the configuration of the clock prescaler from... — committed to henrikbrixandersen/zephyr by henrikbrixandersen 2 years ago
- drivers: can: sam: use UPLL clock instead of PLLA clock Use the UPLLCK clock for the CAN controller as recommended by the Atmel SAM E70 data sheet. Move the configuration of the clock prescaler from... — committed to zephyrproject-rtos/zephyr by henrikbrixandersen 2 years ago
- drivers: can: sam: use UPLL clock instead of PLLA clock Use the UPLLCK clock for the CAN controller as recommended by the Atmel SAM E70 data sheet. Move the configuration of the clock prescaler from... — committed to laxiLang/zephyr by henrikbrixandersen 2 years ago
@CEmir10 ,
We are following datasheet recommendations. I don`t have objections to have a way to select mcan clock from devicetree. Feel free to send a proposal.