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

Fix the issue #4357: NRF52 doesn't support simultaneous use of I2C and SPI. #4634

Merged

Conversation

nvlsianpu
Copy link
Contributor

Description

Add Support for sharing resources between SPI and TWI instancess.
This fix the issue #4357: NRF52 doesn't support simultaneous use of I2C and SPI.
Now this resources are reserved by each of hal driver using nRF5 SDK's serial-box mechanism.

Status

READY

@@ -277,9 +277,11 @@ void spi_init(spi_t *obj,
}
}

for (i = 0; i < SPI_COUNT; ++i) {
for (i = SPI_COUNT - 1; i < SPI_COUNT; i--) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The loop condition should be i >= 0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure: int i.

Use serial-box of Nordic nRF5 SDK to share resource between
SPI and I2C.
SPI is allocated from highest hw instance number resource in order
to allocate as many I2C instances as possible.
@nvlsianpu nvlsianpu force-pushed the bugfix/issue_4357_I2C_SPI_simultaneously branch from aa8b44e to 3236336 Compare June 27, 2017 08:45
@nvlsianpu
Copy link
Contributor Author

@theotherjimmy travis-ci failure is not related to the changes.

@theotherjimmy
Copy link
Contributor

@nvlsianpu Yep. I restarted travis. It should not fail in the same way this time. I hope it passes.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 3, 2017

retest uvisor

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 3, 2017

cc @NeilMacMullen

@MarceloSalazar
Copy link

@0xc0170 what's the status?

@theotherjimmy
Copy link
Contributor

@pan- Would you run your BT testing?

/morph test

@pan-
Copy link
Member

pan- commented Jul 10, 2017

@theotherjimmy There is literally no point at running bluetooth tests, this PR fix an i2c and spi issue. None of those peripherals are used during BLE testing.

@theotherjimmy
Copy link
Contributor

Thanks! We'll wait for morph test then.

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 765

All builds and test passed!

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