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

Port spi_get_peripheral_name fix to some Freescale boards #10033

Merged
merged 2 commits into from Mar 12, 2019

Conversation

@artokin
Copy link
Contributor

commented Mar 11, 2019

Description

Fix issue #9149 (duplicated in https://jira.arm.com/browse/IOTTHD-3315) on K64F and some other MCUExpresso boards.

Port changes from #9845 also to targets: K64F, K66F, KW24D and KW41Z

This PR allows application https://github.com/ARMmbed/mbed-cloud-client-example to connect to Pelion cloud using Freescale boards with Mesh connectivity. Without this fix the application will hang when it is writing data and Mesh radio (802.15.4) is using a SPI bus. If application is configured to use TCP protocol, it will hang 100%.

This PR enables usage of multiple SPI channels for several boards and therefore allows simultaneous usage of SPI bus.

Full details of the original issue are available here: #9149 , correction PR #9845.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@jarlamsa , @kjbracey-arm, @teetak01
cc: @davidsaada

Add spi_get_peripheral_name to MCUEpresso spi_api
Fix issue #9149.

Port changes from #9845 also
to targets: K64F, K66F, KW24D and KW41Z

@ciarmcom ciarmcom requested review from davidsaada, jarlamsa, kjbracey-arm, maclobdell, MarceloSalazar, teetak01 and ARMmbed/mbed-os-maintainers Mar 11, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Mar 11, 2019

@teetak01
Copy link
Contributor

left a comment

@adbridge @0xc0170 this is needed for 5.12.0-RC2

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2019

Too late for RC2 but @ChiefBureaucraticOfficer can make a determination for RC3 ?

@teetak01

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2019

@adbridge this is release blocker for 5.12 so no reason to make RC2 without this.

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2019

@TeemuKultala As I said it is @ChiefBureaucraticOfficer 's call. It would still make 5.12 if it came into RC3 it is more about how much delay this would now add to try and bring it into RC2.

@artokin Can you please detail in the description what the scope and impact of this PR is and what the impact is of not taking it ? Needs to go in the release notes section, then we will make a determination.

@0xc0170
Copy link
Member

left a comment

just a small styling change

@@ -32,6 +32,24 @@ static SPI_Type *const spi_address[] = SPI_BASE_PTRS;
/* Array of SPI bus clock frequencies */
static clock_name_t const spi_clocks[] = SPI_CLOCK_FREQS;

SPIName spi_get_peripheral_name(PinName mosi, PinName miso, PinName sclk) {

This comment has been minimized.

Copy link
@0xc0170

0xc0170 Mar 11, 2019

Member

I see line 54 following our code style, this function should as well { on the new line

This comment has been minimized.

Copy link
@0xc0170

0xc0170 Mar 11, 2019

Member

also for other files, same one

Use Mbed OS coding style
Run astyle 3.0 for the changed c-files.
@adbridge

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2019

@artokin Can you please detail in the description what the scope and impact of this PR is and what the impact is of not taking it ? Needs to go in the release notes section, then we will make a determination.

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2019

ci started

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2019

We will get this into the ci , cosmetic PR changes can be done tomorrow

@mbed-ci

This comment has been minimized.

Copy link

commented Mar 11, 2019

Test run: SUCCESS

Summary: 13 of 13 test jobs passed
Build number : 1
Build artifacts

@ChiefBureaucraticOfficer
Copy link

left a comment

Quite late, but as RC2 generation has not started, it is approved pending review and risk assessment.

@cmonr cmonr merged commit 76c2192 into ARMmbed:master Mar 12, 2019

28 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9051 cycles (-1256 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@cmonr cmonr removed the needs: CI label Mar 12, 2019

@artokin artokin deleted the artokin:port_SPI_peripheral_names branch Mar 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.