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

Dev spi asynch stm32f4 #2542

Merged
merged 8 commits into from
Sep 22, 2016
Merged

Dev spi asynch stm32f4 #2542

merged 8 commits into from
Sep 22, 2016

Conversation

LMESTM
Copy link
Contributor

@LMESTM LMESTM commented Aug 25, 2016

This PRs adds SPI asynch support to F4 family.
This work is derived from existing work done on MBED 3.0

Test summary:
+--------+---------------------+-----------+---------------+------------------+--------------------+---------------+-------+
| Result | Target | Toolchain | Test ID | Test Description | Elapsed Time (sec) | Timeout (sec) | Loops |
+--------+---------------------+-----------+---------------+------------------+--------------------+---------------+-------+
| OK | NUCLEO_F411RE[F26A] | ARM | UT_SPI_ASYNCH | Asynch spi test | 1.93 | 20 | 1/1 |
| OK | NUCLEO_F429ZI[F1CD] | ARM | UT_SPI_ASYNCH | Asynch spi test | 1.92 | 20 | 1/1 |
| OK | NUCLEO_F446ZE[F130] | ARM | UT_SPI_ASYNCH | Asynch spi test | 1.89 | 20 | 1/1 |
| OK | NUCLEO_F446RE[F048] | ARM | UT_SPI_ASYNCH | Asynch spi test | 1.93 | 20 | 1/1 |
| OK | NUCLEO_F401RE[F17C] | ARM | UT_SPI_ASYNCH | Asynch spi test | 1.93 | 20 | 1/1 |
| OK | NUCLEO_F410RB[F619] | ARM | UT_SPI_ASYNCH | Asynch spi test | 1.86 | 20 | 1/1 |
| OK | DISCO_F429ZI[F0A3] | ARM | UT_SPI_ASYNCH | Asynch spi test | 1.88 | 20 | 1/1 |
+--------+---------------------+-----------+---------------+------------------+--------------------+---------------+-------+
Result: 7 OK

@LMESTM
Copy link
Contributor Author

LMESTM commented Aug 29, 2016

rebased as there were conflicts

@sg- sg- removed the needs: review label Sep 8, 2016
@sg-
Copy link
Contributor

sg- commented Sep 8, 2016

/morph test

@sg-
Copy link
Contributor

sg- commented Sep 8, 2016

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

mbed-bot commented Sep 9, 2016

Result: FAILURE

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

/morph test

Output

mbed Build Number: 791

Build failed!

@mbed-bot
Copy link

mbed-bot commented Sep 9, 2016

[Build 881]
FAILURE: Something went wrong when building and testing.

@bogdanm
Copy link
Contributor

bogdanm commented Sep 9, 2016

@LMESTM: did you try to compile with IAR? I can see this error in the CI logs for a number of boards (for example NUCLEO_F401RE):

Compile: spi_api.c
[Error] spi_api.c@561,22: [Pe852]: expression must be a pointer to a complete object type

@LMESTM
Copy link
Contributor Author

LMESTM commented Sep 12, 2016

@bogdanm Thanks for pointing out the compilation issue - I only compiled on ARM so far.
Note that there is actually an ongoing discussion #2599 which may impact this PR - so let's keep it as 'needs work' for now. I'll solve compilation issues and others at the same time.

@LMESTM
Copy link
Contributor Author

LMESTM commented Sep 13, 2016

I updated the PR to correct the compilation errors and also simplifed cide to reflect recent discussion on spi asynch transfer API

@LMESTM LMESTM force-pushed the dev_spi_asynch_stm32f4 branch 2 times, most recently from 931dafb to e8fed75 Compare September 13, 2016 15:57
@LMESTM
Copy link
Contributor Author

LMESTM commented Sep 15, 2016

@0xc0170 - rebased 2 days ago and updated in line with SPI discussion

@sg- sg- removed the needs: work label Sep 16, 2016
@sg-
Copy link
Contributor

sg- commented Sep 16, 2016

/morph test

@sg-
Copy link
Contributor

sg- commented Sep 16, 2016

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

@mbed-bot
Copy link

[Build 940]
FAILURE: Something went wrong when building and testing.

@sg-
Copy link
Contributor

sg- commented Sep 17, 2016

@LMESTM could you rebase and resolve conflicts?

@LMESTM
Copy link
Contributor Author

LMESTM commented Sep 19, 2016

@sg- just rebased

@sg-
Copy link
Contributor

sg- commented Sep 19, 2016

/morph test

@sg-
Copy link
Contributor

sg- commented Sep 19, 2016

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: null

Examples Build failed!

@mbed-bot
Copy link

[Build 948]
SUCCESS: Building succeeded and tests were run! Be sure to check the test results

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 20, 2016

Result: FAILURE

There was a problem on master, that should be now resolved, can you please rebase again? To make the tests pass. sorry for the trouble

Laurent MEUNIER added 6 commits September 20, 2016 19:25
This commit is highly derived from an existing work from salkinium.

It adds SPI ASYNC support to STM32 F4 devices. This required a small
rework of the structure to have SYNCH and ASYNCH co-exist.
Same information was stored in spi_api.c and STM32 HAL layers.
Modify code to avoid this duplicate information.
Update test to be able to test on NUCLEO boards using generic
default pins definitions
Following discussion on:

it seems now clear that the transfer API is meant to be used either
with only Rx, or only Tx or Rx and Tx with the same lenth.

Therefore we're removing support of transfers of Rx and Tx with different
lenghts - this makes porting to HAL more direct and simpler.
If SPI TXE is not disabled at the end of transfer, MBED application
callback that is registered for transfer completion might be called twice
@LMESTM
Copy link
Contributor Author

LMESTM commented Sep 20, 2016

@0xc0170 rebased

@bridadan
Copy link
Contributor

/morph test

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 905

All builds and test passed!

@0xc0170 0xc0170 removed the needs: CI label Sep 21, 2016
@@ -152,7 +164,7 @@ TEST(SPI_Master_Asynchronous, short_tx_0_rx)
{
int rc;
// Write a buffer of Short Transfer length.
rc = obj->transfer( tx_buf,SHORT_XFR,NULL,0, callback, -1);
rc = obj->transfer( (const uint8_t *) tx_buf, SHORT_XFR, (uint8_t *) NULL, 0, callback, 255);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: the last argument, should be consistent with the rest and change it there or revert this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right - let's make it consistent - update sent

@sg- sg- merged commit 4fa65a6 into ARMmbed:master Sep 22, 2016
@LMESTM LMESTM deleted the dev_spi_asynch_stm32f4 branch May 23, 2017 15:06
aisair pushed a commit to aisair/mbed that referenced this pull request Apr 30, 2024
Ports for Upcoming Targets

2669: Added u-blox C029 target ARMmbed/mbed-os#2669
2707: [EFM32] Add IAR support for remaining Silicon Labs targets ARMmbed/mbed-os#2707
2819: MultiTech xDot platform support - 09.26.2016 ARMmbed/mbed-os#2819
2827: include MultiTech xDot in mbed 5 releases ARMmbed/mbed-os#2827

Fixes and Changes

2522: Add CThunk for CM7 ARMmbed/mbed-os#2522
2518: Enable uvisor on Beetle ARMmbed/mbed-os#2518
2571: STM32F7 - Add asynchronous serial ARMmbed/mbed-os#2571
2616: STM32F3xx - Add Serial Flow Control pins + enable it ARMmbed/mbed-os#2616
2619: NUCLEO_L152RE - Add Serial Flow Control ARMmbed/mbed-os#2619
2620: NUCLEO_F429ZI - Add SERIAL_FC macro ARMmbed/mbed-os#2620
2666: [EFM32] Microsecond ticker optimization ARMmbed/mbed-os#2666
2681: STM32F0xx - Add support of ADC internal channels ARMmbed/mbed-os#2681
2687: [NRF5] Add fs_data symbol in data secton for gcc ARMmbed/mbed-os#2687
2696: Add device_has to all nrf51 devices ARMmbed/mbed-os#2696
2703: TARGET_NRF5: Changed 'serial_baud' implementation to support special baud rates. ARMmbed/mbed-os#2703
2704: DISCO_L476VG: add SPI nicknames ARMmbed/mbed-os#2704
2723: KSDK serial_api.c: Fix assertion error for ParityEven ARMmbed/mbed-os#2723
2463: [STM32L0] Add asynchronous serial ARMmbed/mbed-os#2463
2572: Fix STM32F407VG target name and LPC11U6X linker errors ARMmbed/mbed-os#2572
2698: DELTA_DFBM_NQ620 target ARMmbed/mbed-os#2698
2542: Dev spi asynch stm32f4 ARMmbed/mbed-os#2542
2650: STM32F3 - Add low power timer ARMmbed/mbed-os#2650
2415: [STM32F0] Add asynchronous serial ARMmbed/mbed-os#2415
2585: Added support for ADC only pins in LPC43xx ARMmbed/mbed-os#2585
2622: [STM32F4] Add asynchronous I2C ARMmbed/mbed-os#2622
2719: Updated ARM linker scripts for Kinetis platforms that use SDK 2.0 ARMmbed/mbed-os#2719
2728: Added ethernet and enabled IPV4 feature for the EVK-ODIN-W2/C029 target ARMmbed/mbed-os#2728
2747: [LPC11U68] Fix pin interrupt select offset ARMmbed/mbed-os#2747
2751: STM32L0xx - Add Serial Flow Control ARMmbed/mbed-os#2751
2753: [NUCLEO_F767ZI] Add CAN capability ARMmbed/mbed-os#2753
2759: STM32F0 - Add low power timer ARMmbed/mbed-os#2759
2763: STM32L1 - Add low power timer ARMmbed/mbed-os#2763
2764: STM32L4 - Add low power timer ARMmbed/mbed-os#2764
2771: STM32L4 - Update deepsleep implementation ARMmbed/mbed-os#2771
2775: Update KSDK SDHC driver for K64F & K66F ARMmbed/mbed-os#2775
2792: [NUCLEO_F303ZE] MBED-OS5 capability ARMmbed/mbed-os#2792
2762: STM32L0 - Add low power timer ARMmbed/mbed-os#2762
2761: STM32F7 - Add low power timer ARMmbed/mbed-os#2761
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.

6 participants