Recurring 'Sensor control failed' issue with GPIO pins engaged

I am using Portenta H7 with LoRa Vision Shield for a field application where I’ll be powering the system up with 5V on VIN and using camera and LoRa. I also have a few external modules connected to pins that I have chosen to ensure they don’t conflict with camera or LoRa:

PIR - PA8
RTC - D11/12 (I2C)
PWM driver - PH15
Switch - PC7
LEDs - PG7,

In my trials I’ve come across Sensor control failed issues a lot so was hoping to engage in some discussion here to understand why this happens so often (as reported by other users too).

During my runs:

  1. The first time I power the system up, it fails quite often (Sensor control failed: got it in log files through try-catch). If I disconnect the battery and connect, it works most of the times. Sometimes, I have to take the Portenta out of the PCB and re-insert, OR disconnect the camera (HM01B0/HM0360) and reconnect, OR disconnect the whole Vision Shield and reconnect. I have not been able to find a standard solution yet.

  2. Once the Portenta does not work in my PCB, I often take it out of the board and connect to my PC to understand what’s happening. I see the IDE detect the sensor but still throw the same error. Often the same fixes as described in point 1 fixes the issue.

  1. I also suspect that sometimes getting a HIGH on PIR while the system is prepping Camera and LoRaWAN connection fails the application. I don’t have evidence on this yet as it’s just observation based, and I haven’t looked into this too much yet but thought this could be useful info. I will raise a separate query for this soon.

If you could help me understand methods, software or hardware, that I could use to eliminate the issue, it would be of great help. The system is to be used by field scientists with zero debugging knowledge so success of application is dependent on its user friendliness.

PC

Hi Prithulc, do you have a script which can generate the issue on the standard portena board and the lora shield in a standalone situation? I don’t have a lora network to connect to. So, it’s hard for me to help beyond testing the default system.

Hi Kwabena, let me check if I can make a simple script to reproduce the issue. Sorry, this might take a while as I’ll also check if I’m getting the issue without PCB board (as in, on a breadboard with 5V input on VIN). Get back to you soon.

PC