Use NRF_P1 current anomaly

Hello,

I encountered a very strange problem. This problem originated from my development of RGB color lights using the NRF52840. Due to the limitations of RGB color lights, I needed to control the high and low level changes of the IO port extremely quickly. For example, I needed a high level of 300ns and a low level of 900ns.

When I used the function nrf_gpio_pin_set, I found that it did not conform to this specification. When I chose to directly use NRF_P1->, my RGB worked properly and had been used normally before. However, there was a persistent problem: the current was much higher than expected. I originally suspected that the current of the RGB itself was high, but when I removed the RGB, it was still the same.

At this point, I began to investigate the software problem. When I finally removed NRF_P1->, the cause was found and the current was normal. I was very puzzled by this. I did another test. I reset the software but did not operate the RGB light, that is, I did not use NRF_P1->OUTSET, the current was normal. However, as long as I used NRF_P1->OUTSET, even though the RGB light had been removed by me, there was still an additional 2mA of current.

Please help me answer the above questions. I'm really looking forward to your reply!

Parents
  • Hello,

    If the GPIO output is the culprit, then the only explanation for the increased current draw I can think of is that the output is driving something. Does the current consumption stay at 2 mA if you only drive the output LOW or HIGH? Also, could you show how the delay_100Ns function is implemented?

    Best regards,

    Vidar

  • Yes, no matter how I operate, as long as NRF_P1-> is run, the power consumption will increase. You can see that I tried to reset the RGB, and after resetting, I restored the IO port to its default setting, but this didn't have any effect.

    The following is my function with a delay of 100NS, using the NOP instruction. The delay captured by a logic analyzer is approximately 90ns. The strange thing about me is that even though I have removed the RGB lights from my hardware, the problem still cannot be solved, which makes it impossible for me to optimize my power consumption.

Reply
  • Yes, no matter how I operate, as long as NRF_P1-> is run, the power consumption will increase. You can see that I tried to reset the RGB, and after resetting, I restored the IO port to its default setting, but this didn't have any effect.

    The following is my function with a delay of 100NS, using the NOP instruction. The delay captured by a logic analyzer is approximately 90ns. The strange thing about me is that even though I have removed the RGB lights from my hardware, the problem still cannot be solved, which makes it impossible for me to optimize my power consumption.

Children
Related