cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746G-DISCO + TouchGFX without RTOS + MAX30102 I2C sensor problem

Benz
Associate

Dear Community!

I'm using an STM32F746G Discovery Kit, and just getting started with TouchGFX. I saw, that when you make a TouchGFX project, it automatically creates the project with FreeRTOS. Now on, I don't need OS right now, so I made some changes in the IOC, (disabled OS, deleted OS dependecies) and now it compiled perfectly and everything is fine, so I can still make screen changes in TouchGFX and it works in a simple while() loop.

In the STM32CubeIDE, I enabled some USART and I2C, because I am using a MAX30102 pulse oximeter sensor. I have a lot of experience with it, so when I saw it's output signal, I knew instantly that something is wrong with the setup. The while() loop which controls the sensor read is simple:

0693W00000aHb22QAC.png 

After that, in the PC serial plot program, I see a "noisy like" sensor output, which is (I think) caused by some TouchGFX thing... The IR and RED signal should be a smooth "line" in idle state if I do nothing with it, but now it has this fancy noise 🙂 :

0693W00000aHb0wQAC.png 

The library, which controls the sensor works PERFECTLY in other project, which is free from TouchGFX in this same F7 Disco board, so it's not the sensor's fault, something is caused here by the TouchGFX without RTOS I beleive... I tried commenting the MX_TouchGFX_Process(), with that the noise is smaller, but still there! The UART sending works fine, because it also works perfectly in the other project.

Thank you for your help!

Ben,

Electrical Engineer

1 REPLY 1
S.Ma
Principal

You could tr6 an I2C sw bitbang to differential debug and duagnose issues.

Example here in I2C_MasterIO.c