Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: spi_nrfx_spim: Incorrect handling of extended SPIM configuration #21126

Closed
anangl opened this issue Dec 3, 2019 · 0 comments · Fixed by #21128
Closed

drivers: spi_nrfx_spim: Incorrect handling of extended SPIM configuration #21126

anangl opened this issue Dec 3, 2019 · 0 comments · Fixed by #21128
Assignees
Labels
area: Drivers area: SPI SPI bus bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug

Comments

@anangl
Copy link
Member

anangl commented Dec 3, 2019

Describe the bug
Extended SPIM configuration (needed by the SPI_3_NRF_RX_DELAY Kconfig option) is not handled correctly in spi_nrfx_spim.c. In result, no other SPIM instance can be enabled together with SPIM3.

To Reproduce

  1. In the hello_world sample, add the following lines to prj.conf:
CONFIG_SPI=y
CONFIG_SPI_2=y
CONFIG_SPI_2_NRF_SPIM=y
CONFIG_SPI_3=y

and create a file named nrf52840_pca10056.overlay with the following content:

&spi2 {
	compatible = "nordic,nrf-spim";
};
  1. Try to build the sample for the nrf52840_pca10056 board:
west build -b nrf52840_pca10056
  1. See that compilation fails.

Expected behavior
Successful build.

Impact
showstopper

Screenshots or console output

spi_nrfx_spim.c:365:14: error: 'CONFIG_SPI_2_NRF_RX_DELAY' undeclared here (not in a function); did you mean 'CONFIG_SPI_3_NRF_RX_DELAY'?
  .rx_delay = CONFIG_SPI_##idx##_NRF_RX_DELAY,
              ^~~~~~~~~~~

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: Zephyr SDK
  • Zephyr 2.1.0 rc2 (92e017f) but the same error will occur for Zephyr 1.14.1 (77c455c)
@anangl anangl added bug The issue is a bug, or the PR is fixing a bug area: Drivers area: SPI SPI bus platform: nRF Nordic nRFx labels Dec 3, 2019
@anangl anangl self-assigned this Dec 3, 2019
@nashif nashif added the has-pr label Dec 3, 2019
@dleach02 dleach02 added the priority: medium Medium impact/importance bug label Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Drivers area: SPI SPI bus bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants