Close

Power Issue FIXED!!

A project log for Wireless BLE Kinesis Advantage (Custom Controller)

Replaces the stock controller with an nRF52 BLE SOC and MCP23S17 io expander. BLE Kinesis with great (few months) battery life.

mike-wMike W 10/30/2018 at 14:470 Comments

Looked a little harder and it turns out I wasn't the only one suspecting the ADC of preventing the feather from going to sleep. Anyway, the reason and fix for it is way over my head. Something to do with floats and the FPU?

The good news is after some copy-pasting ...

   #if (__FPU_USED == 1)
  __set_FPSCR(__get_FPSCR() & ~(0x0000009F)); 
  (void) __get_FPSCR();
  NVIC_ClearPendingIRQ(FPU_IRQn);
  #endif
  uint32_t err_code = sd_app_evt_wait();

We got sleep back!  Same as before, looking at 2mA without any LED(s). Aaand I think I'm finally done here! If anybody goes and builds this feel free to post if you run into any issues or even better have suggestions for the build.

Discussions