Hi,
my device does some UART communication. Because temperature drift of HFINT is to large, the external HFXO has to be used. To make things worse, this is a low power device and so HFXO should be started only if UART communication takes place.
Idea is to call sd_clock_hfclk_request() on start of communication and sd_clock_hfclk_release() on end of reception of the response.
Unfortunately sd_clock_hfclk_request() throws a hard fault if called within a RTC2 interrupt context, same valid for the release function - which works if called from the UART interrupt context.
Questions:
- when and why is this hard fault happening?
- how to prevent this?
- when is it safe to call the sd_clock_hfclk_*() functions?
- how can one determine if the RTC2 interrupt context is active?
Thanks for help / ideas.
Hardy