RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

periph/spi: add support for printing and testing SPI clock rate (2nd)

Open MrKevinWeiss opened this issue 2 years ago • 4 comments

Contribution description

Taken over from another PR. We will see how much it needs.

Testing procedure

TBD

Issues/PRs references

Based off #16727 from @hugueslarrive

MrKevinWeiss avatar Jul 26 '22 18:07 MrKevinWeiss

I am just running a build test. Reschedule if needed.

MrKevinWeiss avatar Jul 26 '22 18:07 MrKevinWeiss

@MrKevinWeiss Since we are now using the ESP-IDF SPI HAL/LL for ESP32, ESP32 has its own periph/spi implementation which should be covered by this PR. Even though cpu/esp32/periph/spi.c already uses directly the given clock in spi_acquire, functions spi_get_clk and spi_get_freq have to be implemented and type spi_clk_t should be removed from here https://github.com/RIOT-OS/RIOT/blob/7ee1b585737b87c5a7df355f81ff113515289dfe/cpu/esp32/include/periph_cpu.h#L576-L583

gschorcht avatar Jul 27 '22 06:07 gschorcht

Yup, looks like it needs more than a simple rebase

MrKevinWeiss avatar Jul 27 '22 07:07 MrKevinWeiss

@MrKevinWeiss I committed the changes for ESP32 to your branch.

gschorcht avatar Jul 27 '22 11:07 gschorcht

rebased... I will work on porting some robot tests so we can check it on the hardware. Probably worth some manual testing as well.

MrKevinWeiss avatar Aug 30 '22 15:08 MrKevinWeiss

HiL Test Results

PASS FAIL SKIP
1 25 2
  ❌ frdm-k22f (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ nucleo-f091rc (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ nucleo-f303re (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ nucleo-g474re (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ nucleo-f767zi (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ nucleo-l152re (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ nucleo-f207zg (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ arduino-mega2560 (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ nucleo-l432kc (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ saml10-xpro (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ saml11-xpro (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ samr30-xpro (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ nrf52dk (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ remote-revb (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ nucleo-l073rz (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ nucleo-f411re (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ nucleo-f103rb (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ frdm-kw41z (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ esp32-wroom-32 (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ z1 (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ frdm-k64f (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  ❌ same54-xpro (1 fail test)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi ❌ test fail
  😬 samr21-xpro (1 fail flash)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi 😬 flash fail
  😬 esp8266-esp-12x (1 fail flash)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi 😬 flash fail
  😬 arduino-due (1 fail flash)
PASS FAIL SKIP
0 1 0
TEST RESULT
tests/periph_spi 😬 flash fail
  ✅ samr34-xpro
PASS FAIL SKIP
0 0 1
TEST RESULT
tests/periph_spi 🙈 skip
  ✅ slstk3401a
PASS FAIL SKIP
1 0 0
TEST RESULT
tests/periph_spi ✅ pass
  ✅ slstk3400a
PASS FAIL SKIP
0 0 1
TEST RESULT
tests/periph_spi 🙈 skip

riot-hil-bot avatar Aug 30 '22 15:08 riot-hil-bot

oh ya, going to need a bit more love.

MrKevinWeiss avatar Aug 30 '22 16:08 MrKevinWeiss

Is this in a reviewable state already? Could you fix the merge conflicts and squash fixup and other "noch mal" style commits, or is there more work needed on the conceptual side anyway?

chrysn avatar Aug 16 '23 21:08 chrysn