STM32: I2C: reset state machine #3685
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This I2C IP is meant for automatic STOP, based on programmed number
of bytes to be sent or receivede, not a user triggered STOP.
So the state machiine needs to be reset in case we use this I2C mbed
unitary API (start / byte_write / byte_read / stop).
This PR allows to solve some remaining issues with i2c ci test shield on L4 / F3 / F7 boards.
##TESTS RESULTS
+----------------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
| target | platform_name | test suite | test case | passed | failed | result | elapsed_time (sec) |
+----------------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
| DISCO_F746NG-GCC_ARM | DISCO_F746NG | tests-api-i2c | I2C - EEProm WR 10 Bytes | 1 | 0 | OK | 0.32 |
| DISCO_F746NG-GCC_ARM | DISCO_F746NG | tests-api-i2c | I2C - EEProm WR 100 Bytes | 1 | 0 | OK | 0.72 |
| DISCO_F746NG-GCC_ARM | DISCO_F746NG | tests-api-i2c | I2C - EEProm WR 2 Bytes | 1 | 0 | OK | 0.29 |
| DISCO_F746NG-GCC_ARM | DISCO_F746NG | tests-api-i2c | I2C - EEProm WR Single Byte | 1 | 0 | OK | 0.17 |
| DISCO_F746NG-GCC_ARM | DISCO_F746NG | tests-api-i2c | I2C - Instantiation of I2C Object | 1 | 0 | OK | 0.07 |
| DISCO_F746NG-GCC_ARM | DISCO_F746NG | tests-api-i2c | I2C - LM75B Temperature Read | 1 | 0 | OK | 0.12 |
+----------------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
+-----------------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
| target | platform_name | test suite | test case | passed | failed | result | elapsed_time (sec) |
+-----------------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
| NUCLEO_L476RG-GCC_ARM | NUCLEO_L476RG | tests-api-i2c | I2C - EEProm WR 10 Bytes | 1 | 0 | OK | 0.33 |
| NUCLEO_L476RG-GCC_ARM | NUCLEO_L476RG | tests-api-i2c | I2C - EEProm WR 100 Bytes | 1 | 0 | OK | 0.72 |
| NUCLEO_L476RG-GCC_ARM | NUCLEO_L476RG | tests-api-i2c | I2C - EEProm WR 2 Bytes | 1 | 0 | OK | 0.29 |
| NUCLEO_L476RG-GCC_ARM | NUCLEO_L476RG | tests-api-i2c | I2C - EEProm WR Single Byte | 1 | 0 | OK | 0.16 |
| NUCLEO_L476RG-GCC_ARM | NUCLEO_L476RG | tests-api-i2c | I2C - Instantiation of I2C Object | 1 | 0 | OK | 0.06 |
| NUCLEO_L476RG-GCC_ARM | NUCLEO_L476RG | tests-api-i2c | I2C - LM75B Temperature Read | 1 | 0 | OK | 0.12 |
+-----------------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
+-----------------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
| target | platform_name | test suite | test case | passed | failed | result | elapsed_time (sec) |
+-----------------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
| NUCLEO_F334R8-GCC_ARM | NUCLEO_F334R8 | tests-api-i2c | I2C - EEProm WR 10 Bytes | 1 | 0 | OK | 0.33 |
| NUCLEO_F334R8-GCC_ARM | NUCLEO_F334R8 | tests-api-i2c | I2C - EEProm WR 100 Bytes | 1 | 0 | OK | 0.73 |
| NUCLEO_F334R8-GCC_ARM | NUCLEO_F334R8 | tests-api-i2c | I2C - EEProm WR 2 Bytes | 1 | 0 | OK | 0.28 |
| NUCLEO_F334R8-GCC_ARM | NUCLEO_F334R8 | tests-api-i2c | I2C - EEProm WR Single Byte | 1 | 0 | OK | 0.16 |
| NUCLEO_F334R8-GCC_ARM | NUCLEO_F334R8 | tests-api-i2c | I2C - Instantiation of I2C Object | 1 | 0 | OK | 0.06 |
| NUCLEO_F334R8-GCC_ARM | NUCLEO_F334R8 | tests-api-i2c | I2C - LM75B Temperature Read | 1 | 0 | OK | 0.11 |
+-----------------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+