Skip to content

Conversation

mprse
Copy link
Contributor

@mprse mprse commented Dec 20, 2019

Summary of changes

Increase coverage of the SPI master FPGA test:

  • test supported frequencies (based on the device capabilities),
  • add support for manual CS handling and adapt test,
  • add test cases for rx/tx buffers with different length (based on the device capabilities),
  • add test case for one symbol transmission,
  • add test cases for different symbol sizes (based on the device capabilities).

Update default SPI capabilities and target specific capabilities (STM, NFR32x).

TEST RESULTS:

| target       | platform_name | test suite                             | test case                                  | passed | failed | result | elapsed_time (sec) |
|--------------|---------------|----------------------------------------|--------------------------------------------|--------|--------|--------|--------------------|
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - async mode (hw ss)                   | 1      | 0      | OK     | 0.22               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - async mode (sw ss)                   | 1      | 0      | OK     | 0.21               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test                           | 1      | 0      | OK     | 0.28               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test (direct init)             | 1      | 0      | OK     | 0.3                |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write                          | 1      | 0      | OK     | 0.19               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write(one sym)                 | 1      | 0      | OK     | 0.2                |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx < rx                      | 1      | 0      | OK     | 0.27               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx > rx                      | 1      | 0      | OK     | 0.26               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (2 MHz)            | 1      | 0      | OK     | 0.22               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (500 kHz)          | 1      | 0      | OK     | 0.23               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities max) | 1      | 0      | OK     | 0.23               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities min) | 1      | 0      | OK     | 0.24               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling                 | 1      | 0      | OK     | 0.22               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling(block)          | 1      | 0      | OK     | 0.23               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - init/free test all pins              | 1      | 0      | OK     | 0.5                |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_1)                | 1      | 0      | OK     | 0.21               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_2)                | 1      | 0      | OK     | 0.2                |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_3)                | 1      | 0      | OK     | 0.21               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (12)             | 1      | 0      | OK     | 0.27               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (16)             | 1      | 0      | OK     | 0.22               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (24)             | 1      | 0      | OK     | 0.26               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (32)             | 1      | 0      | OK     | 0.27               |
| K64F-GCC_ARM | K64F          | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (4)              | 1      | 0      | OK     | 0.27               |
mbedgt: test case results: 23 OK
mbedgt: completed in 36.39 sec

| target                | platform_name | test suite                             | test case                                  | passed | failed | result | elapsed_time (sec) |
|-----------------------|---------------|----------------------------------------|--------------------------------------------|--------|--------|--------|--------------------|
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - async mode (hw ss)                   | 1      | 0      | OK     | 0.13               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - async mode (sw ss)                   | 1      | 0      | OK     | 0.22               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test                           | 1      | 0      | OK     | 0.37               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test (direct init)             | 1      | 0      | OK     | 0.38               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write                          | 1      | 0      | OK     | 0.21               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write(one sym)                 | 1      | 0      | OK     | 0.22               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx < rx                      | 1      | 0      | OK     | 0.21               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx > rx                      | 1      | 0      | OK     | 0.21               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (2 MHz)            | 1      | 0      | OK     | 0.23               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (500 kHz)          | 1      | 0      | OK     | 0.23               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities max) | 1      | 0      | OK     | 0.24               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities min) | 1      | 0      | OK     | 0.24               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling                 | 1      | 0      | OK     | 0.14               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling(block)          | 1      | 0      | OK     | 0.14               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - init/free test all pins              | 1      | 0      | OK     | 0.59               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_1)                | 1      | 0      | OK     | 0.21               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_2)                | 1      | 0      | OK     | 0.23               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_3)                | 1      | 0      | OK     | 0.23               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (12)             | 1      | 0      | OK     | 0.29               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (16)             | 1      | 0      | OK     | 0.22               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (24)             | 1      | 0      | OK     | 0.29               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (32)             | 1      | 0      | OK     | 0.28               |
| NUCLEO_F429ZI-GCC_ARM | NUCLEO_F429ZI | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (4)              | 1      | 0      | OK     | 0.28               |
mbedgt: test case results: 23 OK
mbedgt: completed in 32.10 sec

| target              | platform_name | test suite                             | test case                                  | passed | failed | result | elapsed_time (sec) |
|---------------------|---------------|----------------------------------------|--------------------------------------------|--------|--------|--------|--------------------|
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test                           | 1      | 0      | OK     | 0.2                |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test (direct init)             | 1      | 0      | OK     | 0.21               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write                          | 1      | 0      | OK     | 0.19               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write(one sym)                 | 1      | 0      | OK     | 0.22               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx < rx                      | 1      | 0      | OK     | 0.26               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx > rx                      | 1      | 0      | OK     | 0.27               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (2 MHz)            | 1      | 0      | OK     | 0.21               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (200 kHz)          | 1      | 0      | OK     | 0.24               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities max) | 1      | 0      | OK     | 0.22               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities min) | 1      | 0      | OK     | 0.24               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling                 | 1      | 0      | OK     | 0.21               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling(block)          | 1      | 0      | OK     | 0.22               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - init/free test all pins              | 1      | 0      | OK     | 0.4                |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_1)                | 1      | 0      | OK     | 0.21               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_2)                | 1      | 0      | OK     | 0.2                |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_3)                | 1      | 0      | OK     | 0.2                |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (12)             | 1      | 0      | OK     | 0.27               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (16)             | 1      | 0      | OK     | 0.2                |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (24)             | 1      | 0      | OK     | 0.26               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (32)             | 1      | 0      | OK     | 0.27               |
| LPC55S69_NS-GCC_ARM | LPC55S69      | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (4)              | 1      | 0      | OK     | 0.26               |
mbedgt: test case results: 21 OK


| target              | platform_name | test suite                             | test case                                  | passed | failed | result | elapsed_time (sec) |
|---------------------|---------------|----------------------------------------|--------------------------------------------|--------|--------|--------|--------------------|
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - async mode (hw ss)                   | 1      | 0      | OK     | 0.27               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - async mode (sw ss)                   | 1      | 0      | OK     | 0.22               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test                           | 1      | 0      | OK     | 0.21               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test (direct init)             | 1      | 0      | OK     | 0.23               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write                          | 1      | 0      | OK     | 0.22               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write(one sym)                 | 1      | 0      | OK     | 0.24               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx < rx                      | 1      | 0      | OK     | 0.22               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx > rx                      | 1      | 0      | OK     | 0.22               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (2 MHz)            | 1      | 0      | OK     | 0.24               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (200 kHz)          | 1      | 0      | OK     | 0.26               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities max) | 1      | 0      | OK     | 0.24               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities min) | 1      | 0      | OK     | 0.27               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling                 | 1      | 0      | OK     | 0.27               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling(block)          | 1      | 0      | OK     | 0.26               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - init/free test all pins              | 1      | 0      | OK     | 1.96               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_1)                | 1      | 0      | OK     | 0.23               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_2)                | 1      | 0      | OK     | 0.23               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_3)                | 1      | 0      | OK     | 0.23               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (12)             | 1      | 0      | OK     | 0.27               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (16)             | 1      | 0      | OK     | 0.27               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (24)             | 1      | 0      | OK     | 0.27               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (32)             | 1      | 0      | OK     | 0.27               |
| NRF52840_DK-GCC_ARM | NRF52840_DK   | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (4)              | 1      | 0      | OK     | 0.27               |
mbedgt: test case results: 23 OK

| target                | platform_name | test suite                             | test case                                  | passed | failed | result | elapsed_time (sec) |
|-----------------------|---------------|----------------------------------------|--------------------------------------------|--------|--------|--------|--------------------|
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - async mode (hw ss)                   | 1      | 0      | OK     | 0.24               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - async mode (sw ss)                   | 1      | 0      | OK     | 0.23               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test                           | 1      | 0      | OK     | 0.26               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test (direct init)             | 1      | 0      | OK     | 0.29               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write                          | 1      | 0      | OK     | 0.22               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write(one sym)                 | 1      | 0      | OK     | 0.23               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx < rx                      | 1      | 0      | OK     | 0.23               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx > rx                      | 1      | 0      | OK     | 0.24               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (2 MHz)            | 1      | 0      | OK     | 0.24               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (200 kHz)          | 1      | 0      | OK     | 0.24               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities max) | 1      | 0      | OK     | 0.24               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities min) | 1      | 0      | OK     | 0.27               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling                 | 1      | 0      | OK     | 0.23               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling(block)          | 1      | 0      | OK     | 0.25               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - init/free test all pins              | 1      | 0      | OK     | 0.79               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_1)                | 1      | 0      | OK     | 0.24               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_2)                | 1      | 0      | OK     | 0.24               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_3)                | 1      | 0      | OK     | 0.24               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (12)             | 1      | 0      | OK     | 0.28               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (16)             | 1      | 0      | OK     | 0.24               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (24)             | 1      | 0      | OK     | 0.29               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (32)             | 1      | 0      | OK     | 0.29               |
| NUCLEO_F303RE-GCC_ARM | NUCLEO_F303RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (4)              | 1      | 0      | OK     | 0.29               |
mbedgt: test case results: 23 OK

| target                | platform_name | test suite                             | test case                                  | passed | failed | result | elapsed_time (sec) |
|-----------------------|---------------|----------------------------------------|--------------------------------------------|--------|--------|--------|--------------------|
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - async mode (hw ss)                   | 1      | 0      | OK     | 0.23               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - async mode (sw ss)                   | 1      | 0      | OK     | 0.22               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test                           | 1      | 0      | OK     | 0.38               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - basic test (direct init)             | 1      | 0      | OK     | 0.38               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write                          | 1      | 0      | OK     | 0.22               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - block write(one sym)                 | 1      | 0      | OK     | 0.23               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx < rx                      | 1      | 0      | OK     | 0.21               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - buffers tx > rx                      | 1      | 0      | OK     | 0.23               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (2 MHz)            | 1      | 0      | OK     | 0.24               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (200 kHz)          | 1      | 0      | OK     | 0.24               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities max) | 1      | 0      | OK     | 0.24               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - frequency testing (capabilities min) | 1      | 0      | OK     | 0.25               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling                 | 1      | 0      | OK     | 0.23               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - hardware ss handling(block)          | 1      | 0      | OK     | 0.25               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - init/free test all pins              | 1      | 0      | OK     | 1.05               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_1)                | 1      | 0      | OK     | 0.22               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_2)                | 1      | 0      | OK     | 0.23               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - mode testing (MODE_3)                | 1      | 0      | OK     | 0.26               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (12)             | 1      | 0      | OK     | 0.29               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (16)             | 1      | 0      | OK     | 0.23               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (24)             | 1      | 0      | OK     | 0.3                |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (32)             | 1      | 0      | OK     | 0.29               |
| NUCLEO_F411RE-GCC_ARM | NUCLEO_F411RE | tests-mbed_hal_fpga_ci_test_shield-spi | SPI - symbol size testing (4)              | 1      | 0      | OK     | 0.28               |
mbedgt: test case results: 23 OK

Impact of changes

Migration actions required

Documentation


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

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

Reviewers


@ciarmcom ciarmcom requested review from a team December 20, 2019 16:00
@ciarmcom
Copy link
Member

@mprse, thank you for your changes.
@ARMmbed/mbed-os-hal @ARMmbed/mbed-os-test @ARMmbed/mbed-os-maintainers please review.

@mprse mprse force-pushed the spi_fpga_test_extend branch from c87e147 to 62f8e9d Compare December 23, 2019 10:52
@mprse mprse changed the title Hackathon: Increase coverage of the SPI master FPGA test - WIP Hackathon: Increase coverage of the SPI master FPGA test Jan 2, 2020
@0xc0170 0xc0170 removed the request for review from a team January 2, 2020 13:25
@adbridge
Copy link
Contributor

adbridge commented Jan 6, 2020

@ARMmbed/mbed-os-hal could you please review

bool hw_cs_handle; /**< If true, in SPI master mode Chip Select can be handled by hardware. */
bool async_mode; /**< If true, in async mode is supported. */

bool tx_rx_buffers_equal_length; /**< If true, rx and tx buffers must have the same length. */
Copy link
Contributor

@0xc0170 0xc0170 Jan 8, 2020

Choose a reason for hiding this comment

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

Why is this needed? isn't this always supported ? How this relates to the hw capabilities?
Often SPI transfer function has one length (both equal) - not our case at least for async. But were asked previously that it would simplify it.

Looking at the test - 2 platforms have this capability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe the name is misleading. Should be the oposit tx_rx_diffrent_lenght. The problem is that on some platforms we can execute spi transfer like:
spi_master_block_write(&spi, p_tx, 10, p_rx, 5, 0xF5);
spi_master_block_write(&spi, p_tx, 5, p_rx, 10, 0xF5);
Unfortunatelly on some platform this won't work. The example is K64F - will take max from rx/tx lenghts for transfer.

On the feature branch, we tried to handle this and this was quite tricky or even impossible (in case of async mode), so we decided to add a requirement that in async mode rx/tx length must be equal.

Here, I didn't have time to update the drivers, so I added this capability. This way I can test different sizes only on targets that support this. From my point of view allowing different tx/rx lengths is redundant, but we can't simply change the API.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 13, 2020

@mprse Who could help reviewing this one ?

@mprse
Copy link
Contributor Author

mprse commented Jan 13, 2020

@mprse Who could help reviewing this one ?
@maciejbocianski @fkjagodzinski @jamesbeyond

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 17, 2020

/jenkins-ci build

@bulislaw
Copy link
Member

@maciejbocianski @fkjagodzinski @jamesbeyond please review

Copy link
Member

@fkjagodzinski fkjagodzinski left a comment

Choose a reason for hiding this comment

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

Approved 👍

*
* Given board provides SPI-Master support.
* When SPI transmission is performed using different settings.
* Then data is successfully transfered.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* Then data is successfully transfered.
* Then data is successfully transferred.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

// Initialize mbed SPI pins
// Manually handle SS pin
if (!auto_ss) {
ss = new DigitalOut(ssel);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ss = new DigitalOut(ssel);
ss = new DigitalOut(ssel, SS_DEASSERT);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@adbridge
Copy link
Contributor

@mprse could you look at the review comments please ?

jamesbeyond
jamesbeyond previously approved these changes Jan 23, 2020
Copy link
Contributor

@jamesbeyond jamesbeyond left a comment

Choose a reason for hiding this comment

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

I am quite happy to see this change. This brings a lot of valuable tests from the feature branch, that we spent quite a lot of efforts! well done @mprse !!

@mergify mergify bot added needs: CI and removed needs: review labels Jan 23, 2020
mprse added 2 commits January 29, 2020 08:23
Increase coverage of the SPI master FPGA test:
 - check supported frequencies (based on the device capabilities),
 - add support for manual CS handling and test cases,
 - add test cases for rx/tx buffers with different length (based on the device capabilities),
 - add test case for one symbol transmission,
 - add test cases for different symbol sizes (based on the device capabilities).
@mprse mprse force-pushed the spi_fpga_test_extend branch from 62f8e9d to d298f96 Compare January 29, 2020 07:24
@mergify mergify bot dismissed jamesbeyond’s stale review January 29, 2020 07:25

Pull request has been modified.

@mprse
Copy link
Contributor Author

mprse commented Jan 29, 2020

Addressed review comments.

@kjbracey
Copy link
Contributor

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 30, 2020

Test run: SUCCESS

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

@kjbracey kjbracey merged commit ba5dd4d into ARMmbed:master Jan 31, 2020
@mergify
Copy link

mergify bot commented Jan 31, 2020

This PR does not contain release version label after merging.

@0xc0170 0xc0170 added release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0 and removed Release review required labels Feb 4, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 4, 2020

I've fixed the version: Set to 6.0.0-alpha-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants