Hello,
I face a problem which I can't understand really and where I need support.
It is strange...
In our electronics we use the nRF52840 which is enclosed in a module (earlier from Taiyo Yuden: EYSKBNZ and now from Kaga Fei Electronics: EB2840AA1), by this I can not really tell which revision (https://docs.nordicsemi.com/bundle/comp_matrix_nrf52840/page/COMP/nrf52840/nRF52840_ic_revision_overview.html) is used.
To describe the problem: In our application the nRF52840 wakes up when a very slow and energy saving Hall sensor 1 (about 6 µA) detects a rotation by a passing magnet. The output of this Hall-Sensor feeds an analogue multiplexer, the output of this analogue multiplexer is connected to Port 0.10 and by a solder bridge also to P0.09 of the nRF52840. These pins are after Reset configured as NFC input pins, but writing
NRF_UICR->NFCPINS = 0xFFFFFFFE;
allows us to use these pins as GPIOs. At wake up the nRF sets P0.13 and P0.14 to high which gives power to 2 additional fast but energy consuming Hall-sensors (Nr. 2 and 3, each draws 500...600 µA). Hall-sensor Nr. 2 is switched on by setting Port P0.14 and its output drives directly Port P0.11 which is configured as input. The other fast Hall-sensor 3 is connected to the second input of the analogue multiplexer; when setting Port 0.13 to high the fast Hall-sensor 3 is supplied and the analogue multiplexer switches to input 2, so the signal of Hall-sensor 3 drives the input at Port 0.10.
After waking up a state machine starts to measure several time differences; this is used to detect the turning direction. The fast Hall-sensor 2 is only used in the first 3 states of this state machine which in total has 4 states. At the end of the 4th state a calculation is done and then the rotation direction is known. Then - depending on the actual speed - a decision is done: If the speed is 500 RPM or less, the slow Hall-sensor is fast enough to deliver good signals, the supply for Hall-sensor 3 is switched off and the analogue multiplexer falls back to let pass the signals from the slow Hall-sensor 1. The rotation phase normally takes between some seconds until some minutes; when the rotation in the machine is stopped all other sensors like acceleration sensor and temperature sensor in our electronics are switched off and the current consumption goes down to under 100 µA, when the BLE-connection (our module is a peripheral / slave) is stopped the current consumption goes down to 40 µA which is perfect.
But: If the measured speed after completing the state machine from the turning direction detection is higher than 500 RPMs, we need the fast Hall-sensor 3 (which at that moment is already in use) and switch back to the slow Hall-sensor 1 only when the machine stops and 0 RPMs are measured. Then also all the other sensors are switched off, but I see a current which is 500...600 µA higher. What is additionally strange: We use the RTC timer as a time counter for knowing more or less the actual time and date; at the first connection with the master/central the actual time is transmitted which allows us to use this date. This timer runs all the time and inside the handler I create a secondly time base. When having switched off all sensors - only the slow Hall-sensor is supplied to detect the next start of rotation - I configure the output for supplying the fast Hall-sensor3 again and again as output and set it to low and still the current is increased.
When I disconnect the PCB with these Hall-sensors in that state I see at the Ampere meter, that the current sinks by about 500 µA.
I changed this test equipment and at an identical second one the behavior is identical. Now I see only 2 possibilities:
1. You can help - maybe a Hardware fault or any other source makes troubles
2. I try to migrate the project to a PCA10056 and try a trace run with our JTrace Pro debugger from Segger.
As I work at this problem since weeks I have no more idea how to fix this problem, but I need to fix it soon...
Thanks in advance.
BR, matthK