You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/01/31 00:01:43 UTC

[GitHub] [incubator-nuttx] v01d commented on a change in pull request #2782: nRF52 fixes

v01d commented on a change in pull request #2782:
URL: https://github.com/apache/incubator-nuttx/pull/2782#discussion_r567341383



##########
File path: arch/arm/src/nrf52/nrf52_tickless_rtc.c
##########
@@ -111,7 +111,17 @@ struct nrf52_tickless_dev_s g_tickless_dev;
  * Private Functions
  ****************************************************************************/
 
-static void rtc_counter_to_ts(uint32_t counter, struct timespec *now)
+static inline uint32_t rtc_getcounter(void)
+{
+  return getreg32(NRF52_RTC_BASE + NRF52_RTC_COUNTER_OFFSET);

Review comment:
       The point is that I'm looking for maximum speed, as close as possible to `*cc = *counter + 2`. I'm not sure it is worth the risk on adding extra computation if it will end up locking up a sleep() under stress execution.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org