RIOT-OS / RobotFW-tests

Includes tests for RIOT based on the Robot Framework
GNU Lesser General Public License v2.1
4 stars 13 forks source link

tests/periph_spi: Add tests for clock speed #73

Closed MarcelStenzel closed 4 years ago

MarcelStenzel commented 4 years ago

This verifies the SPI Clock speed for the valid RIOT values of 100kHZ, 400kHz, 1MHz, 5MHz and 10MHz. Also fixes a bug in the periph_spi main: the argument values were not mapped to the correct clock values.

Atleast for STM32 CPUs there are some problems with higher speeds and the transfer of multiple bytes since there is a pause with every byte. This is currently not calculated in the window and therefore the tranfer seems too slow. For 10MHz and transfer ob Byte PHiLIP always gives 0 as spi.byte_ticks.

MrKevinWeiss commented 4 years ago

We already discussed this but I would like to put it down.

@MarcelStenzel confirmed that the output frequencies from the DUT was incorrect and it was not PHiLIP reading incorrect values. The DUT frequencies were off sometimes over 20% (maybe you can write down what was measured with what device).

In some cases the hardware itself doesn't support setting the exact values, however it is not available in code how to find this out, only commented in some header files.

I still think that something is a bit funny since everything is failing, especially at the higher speeds. I will do some tests here. I just want this written down.