Skip to content

Provide enablement of nrf52840 SPIM #13397

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

Merged
merged 22 commits into from
Aug 21, 2020
Merged

Conversation

winneymj
Copy link

@winneymj winneymj commented Aug 7, 2020

Summary of changes

Currently SPIM code exists in TARGET_SDK_15 for the nrf52840 but is not available to execute in Mbed.

These changes allow the developer to enable SPIM through the configuration file:
mbed-os\targets\TARGET_NORDIC\TARGET_NRF5x\TARGET_NRF52\TARGET_MCU_NRF52840\config\sdk_config.h

Enable the NRFX_SPIM_ENABLED, and because SPI and SPIM use the same hardware, disable the NRFX_SPI_ENABLED

Impact of changes

Migration actions required

Documentation

None that I can see. Would be nice to find a section where I could mention SPIM enabling.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[x] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Aug 7, 2020
@ciarmcom ciarmcom requested review from a team August 7, 2020 01:00
@ciarmcom
Copy link
Member

ciarmcom commented Aug 7, 2020

@winneymj, thank you for your changes.
@ARMmbed/mbed-os-storage @ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-hal please review.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not changing default behavior as it is now (I do not see changes in sdk_config file), it is NRFX_SPI_ENABLED, is that correct?

What is the reason for adding SPIM?

@winneymj
Copy link
Author

winneymj commented Aug 10, 2020 via email

@winneymj
Copy link
Author

winneymj commented Aug 10, 2020 via email

0xc0170
0xc0170 previously approved these changes Aug 11, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 11, 2020

Ci started

@mbed-ci
Copy link

mbed-ci commented Aug 11, 2020

Jenkins CI Test : ❌ FAILED

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-ARM
jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 11, 2020

Please review build logs, there are build errors:

[Error] objects.h@100,5: unknown type name 'nrfx_spi_config_t'
[ERROR] In file included from ./mbed-os/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO/source/PalGenericAccessServiceImpl.cpp:19:
In file included from ./mbed-os/connectivity/FEATURE_BLE/include/ble/internal/PalGenericAccessService.h:25:
In file included from ./mbed-os/connectivity/FEATURE_BLE/include/ble/Gap.h:26:
In file included from ./mbed-os/drivers/include/drivers/LowPowerTimeout.h:20:
In file included from ./mbed-os/platform/include/platform/platform.h:28:
In file included from ./mbed-os/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52832/TARGET_NRF52_DK/device.h:36:
./mbed-os/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h:100:5: error: unknown type name 'nrfx_spi_config_t'
    nrfx_spi_config_t config;
    ^

@mergify mergify bot dismissed 0xc0170’s stale review August 15, 2020 00:44

Pull request has been modified.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 17, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Aug 17, 2020

Jenkins CI Test : ✔️ SUCCESS

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-ARM ✔️
jenkins-ci/mbed-os-ci_build-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 19, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Aug 19, 2020

Jenkins CI Test : ✔️ SUCCESS

Build Number: 3 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-ARM ✔️
jenkins-ci/mbed-os-ci_build-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️

@0xc0170 0xc0170 removed request for a team August 21, 2020 09:39
@0xc0170 0xc0170 merged commit d44fb29 into ARMmbed:master Aug 21, 2020
@mergify mergify bot removed the ready for merge label Aug 21, 2020
@winneymj winneymj deleted the enable_SPIM branch September 5, 2020 21:52
@mbedmain mbedmain added release-version: 6.3.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Sep 14, 2020
@boraozgen
Copy link
Contributor

Just for the record, the commits should have been squashed before merging. The line-by-line git history is messed up with these commits.

@boraozgen
Copy link
Contributor

Furthermore, SPI::transfer API does not seem to work properly with SPIM. I couldn't diagnose the reason yet, but I believe it has something to do with the driver reinitializing before every transfer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants