This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Disable interrupts while recording and playing message

Hi all,

I am working on an application in which i need to record voice and store it in external flash and  later play it. This recording and playing is done using SPI protocol. While recording and playing message i need to maintain clock speed at 32Mhz and all other functions should be stopped while recording and playing message. I don't have consideration for connection to be disconnected while recording and playing message. After i have done my process i can resume with the clock speed as assigned by BLE stack.Timing for recording and playing is 30sec each and is not a continuous process(just 5times a day)

I want to know how can i disable all other functionalities while doing above process and resume from where i had stopped after above process is done.

  • Hi,

    Not sure I completely understand - but if you disable HaltOnRf and ClkDivideOnHalt (see the HCI extended commands, press ctrl+f and search for HCI_EXT) the stack will not change the clock speed away from 32 Mhz at any point.

    If you disconnect from the BLE connection and also don't advertise, there is nothing running except what you are doing. So it should suffice to do this.

    BR,
    Aslak
  • Hi Aslak,
    Thanks for your response.
    1)Can you please let me know at what clock speed stack runs(or should run)? After i have done my process of recording and playing, do i need to enable HaltOnRf and ClkDivideOnHalt to regain its original clock speed?
    2)What do i need to do to immediately start advertising when i have done my analog processing(assuming that connection has been disconnected). I need to re-establish connection in as less time as possible. I am aware that connection time is decided by central device. Will following be enough to re-start advertising immediately after i have done my analog processing?
    uint8 initial_advertising_enable = TRUE;
    GAPRole_SetParameter( GAPROLE_ADVERT_ENABLED, sizeof( uint8 ), &initial_advertising_enable );
  • 1) 32Mhz is the default. You don't have to re-enable these if you don't want to - they're just there to save power.

    2) That is enough, yes.

    BR,
    Aslak