adafruit / Adafruit_nRF52_Arduino

Adafruit code for the Nordic nRF52 BLE SoC on Arduino
Other
623 stars 497 forks source link

Nenik: Fix scheduling at the end of delay(), #537 #553

Closed Nenik closed 4 years ago

Nenik commented 4 years ago

See https://devzone.nordicsemi.com/f/nordic-q-a/63828/vtaskdelay-on-nrf52-freertos-port-wastes-cpu-power for reference

Nenik commented 4 years ago

There goes your pull request. I am in the process of validating it locally as well, but I'll need to combine it with my other fixes (which will come later in separate PRs)

hathach commented 4 years ago

There goes your pull request. I am in the process of validating it locally as well, but I'll need to combine it with my other fixes (which will come later in separate PRs)

Thanks, let's me know when you think it is ready for review/merging

Nenik commented 4 years ago

So my fixes should be ready at this point, top 3 commits on power_fixes branch in my fork: https://github.com/Nenik/Adafruit_nRF52_Arduino/tree/power_fixes All are annotated and cross-referenced to the source (not much original work), though I am not sure how to best post PRs for those (given that it's 3 stacked commits). Either way, the mess above is since I have somehow initially got a clone that was 2 years behind and didn't notice that. My final commit triplet is based on today's head of develop. I have checked the automated build status and have no idea why would the final patchset fail for 52840, the failure is in some template code far from whatever have I touched.

I have rebuilt my test project against this new platform and it built, worked, and exhibited fixed power consumption characteristics. Please let me know if you need the patches in some other form or how should I form the PRs.

hathach commented 4 years ago

@Nenik There is really no way I could review that much of difference and commit. Is there any chance you could

Nenik commented 4 years ago

@hathach that's what I did last night after all that mess. I have reset my fork's develop to the head of upstream (adafruit/Adafruit_nRF52_Arduino), then cherry-picked those 3 commits (one for each issue). My develop is matching your develop (or was last night) and my power_fixes branch is just 3 commits on top of that head-of-develop branch point. I'll retry generating the pull request with that setting.

Nenik commented 4 years ago

Let's drop this one in favor of #554