From 66fe322b604e729875a8ca127bf497b51ff6e380 Mon Sep 17 00:00:00 2001 From: yul Date: Tue, 6 Sep 2022 18:14:25 +0200 Subject: [PATCH] update problem log --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b437b15..65b88e6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,20 @@ -# 2022-août-30 +# 2022-09-06 -L'objectif du jour: Lire un registre de l'oximètre via I2C. (sans succès) +**Problem/Confusion:** + +The yu-capteurs version of function i2c_master_write doesn't transfer nonblockingly correctly. The return value of `I2C_MasterTransferNonBlocking(EXAMPLE_I2C_MASTER, &g_m_handle, masterXfer)` is not `kStatus_Success`. + +[Link](https://githepia.hesge.ch/guoguo.yu/centre-medical-connecte/-/blob/yu-capteurs/project/oximetre/source/oximeter2.c#L103) + +Several things could be the cause of it: +- Badly configured masterXfer variable +- Badly configured handler g_m_handle + - `extern` not done properly maybe? maybe I should use `static`? +- `EXAMPLE_I2C_MASTER` incorrect + +After modifying the oximeter2_init function and changing the EXAMPLE_I2C_MASTER's MSDAT value to 0x46(the correct value), the value goes back to the previous wrong value after `I2C_MasterTransferNonBlocking` in `i2c_master_write`. + +Another observation is that the value `final_result` read in function oximeter2_logs_results is always 92, regardless if the click sensor oximeter2 is connected to the board or not. # 2022-09-05 @@ -20,6 +34,10 @@ I received warnings of "variable 'reg_addr{1,3}' set but not used". Will removing these two variables affecting anything? +# 2022-août-30 + +L'objectif du jour: Lire un registre de l'oximètre via I2C. (sans succès) + # 2022-août-29 L'objectif du jour: Découvrir le capteur oximètre 2 qui est une partie d'une LPC55S16 d'application 2 "centre de mesures".