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

@artokin artokin 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

Fix issue ARMmbed#9149.

Port changes from ARMmbed#9845 also
to targets: K64F, K66F, KW24D and KW41Z
@ciarmcom
Copy link
Member

@artokin, thank you for your changes.
@teetak01 @maclobdell @kjbracey-arm @MarceloSalazar @davidsaada @jarlamsa @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@teetak01 teetak01 left a comment

Choose a reason for hiding this comment

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

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

@adbridge
Copy link
Contributor

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

@teetak01
Copy link
Contributor

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

@adbridge
Copy link
Contributor

adbridge 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.

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.

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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor

Choose a reason for hiding this comment

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

also for other files, same one

Run astyle 3.0 for the changed c-files.
@0xc0170 0xc0170 requested a review from a user March 11, 2019 15:21
@adbridge
Copy link
Contributor

@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
Copy link
Contributor

ci started

@adbridge
Copy link
Contributor

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

@mbed-ci
Copy link

mbed-ci commented Mar 11, 2019

Test run: SUCCESS

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

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

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

@ghost ghost added the PM_ACCEPTED label Mar 11, 2019
@cmonr cmonr merged commit 76c2192 into ARMmbed:master Mar 12, 2019
@cmonr cmonr removed the needs: CI label Mar 12, 2019
@artokin artokin deleted the port_SPI_peripheral_names branch March 12, 2019 11:24
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.

None yet

8 participants