Skip to content

CS check on SPI loopback test case #92200

@Raymond0225

Description

@Raymond0225

Describe the bug

On SPI loopback test case:
this test case failed -[spi_loopback.test_nop_nil_bufs] on DMA mode GPIO CS line.

This case failed is because RX and TX are both NULL and there is no any transfer in fact.
CS line should not be asserted and deasserted.
But in test code, what CS check is always there whatever transfer happens or not.

/* There should be two CS triggers during the transaction, start and end */
zassert_false(spi_loopback_gpio_cs_loopback_check(2));
zassert_ok(pm_device_runtime_put(spec->bus));

I think it is not reasonable.

Regression

  • This is a regression.

Steps to reproduce

  1. Work on NXP RT1050 EVK board.

  2. import spi_loopback example.

  3. Modify mimxrt1050_evk_mimxrt1052_hyperflash.overlay file, add
    / {
    zephyr,user {
    cs-loopback-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
    };
    };

  4. connect J24 pin4 and pin5, connect J24 pin2 and pin3

  5. build and run.

Relevant log output

- FAIL - [spi_loopback.test_nop_nil_bufs] duration = 0.015 seconds

Impact

Annoyance – Minor irritation; no significant impact on usability or functionality.

Environment

Windows11, VSS , V4.1.99

Additional Context

No response

Metadata

Metadata

Labels

area: SPISPI busarea: TestsIssues related to a particular existing or missing testbugThe 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