You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/07/26 00:35:10 UTC

[GitHub] [mynewt-core] mlaz edited a comment on issue #1783: Modified the nRF5x timer and system init code to use the nRF HFXO manager

mlaz edited a comment on issue #1783: Modified the nRF5x timer and system init code to use the nRF HFXO manager
URL: https://github.com/apache/mynewt-core/pull/1783#issuecomment-515264417
 
 
   > > I have a concern with the nrf52_clock_hfxo_wait_until_started() code. If you look at the original code it checked to see if HFCLK was already started and, if so, did not wait to see if EVENTS_HFCLKSTART gets set. I do not know what the chip would do if HFCLK was already started; would it set EVENTS_HFCLKSTART again after it is cleared? If it does not this code would loop infinitely. I do understand that you are probably assuming that if the counter is zero it means that the clock has not been started and there is no need to check it. I think I would check to see if the clock is already started before waiting forever. Would welcome other opinions about this.
   > 
   > Why don't we just include the wait for the clock to start in the original `nrf5x_clock_hfxo_request` functions? The original code in the hal_system.c files does exactly that. It seems reasonable that you might always want to wait for the HFXO to start up before using it. Is there any benefit to _not_ waiting?
   
   Hi @amrbekhit, that seems reasonable, I wonder if could there be a case on which we'd want to do something in between(i.e. setting some registers), which would actually result in less idle time? Not sure. Anyway there should be no problem having it all on the same function. Your rebased code still doesn't feature any checking on whether HFCLK was already started before blocking. Can you please do those changes?

----------------------------------------------------------------
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


With regards,
Apache Git Services