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.

How to turn on and off 32khz crystall connected to CC2640

Other Parts Discussed in Thread: CC2640

Hi everybody.

I have my own custom board which runs cc2640.The 32 khz crystall that is connected to CC2640 is also connected to another chip. In other words, 32 khz clock signal both goes to CC2640 and another sensor chip. I need the sensor chip run always; thus, I need to be able to switch on and off the 32 khz crystall by using CC2640. 

Can anybody please tell me how can I switch on and off the 32 khz crystall connected to CC2640. If I keep it always on, will it cause any malfunctioning on CC2640 ?

Any suggestion is deeply appreciated.

Thank you a lot.

  • Hi Kerem,

    The 32 kHz crystal is started when the CC2640 boots, and it is never turned off. It seems like that is what you need right?

    I have a concern though, connecting one crystal to multiple devices might not work well due to the internal oscillator circuits in your chips. I would rather recommend that you configure the CC2640 to output a 32 kHz clock on an IO which you can feed to the sensor chip (or vice versa).

    Cheers,
    Fredrik
  • Hi Fredik,

    Thank you for your fast response. I have probed the 32khz crystal and I observed only DC voltage.. There was no 32khz voltage swing. I was able to succesfully run the code on CC2640 that I developed( utilized SPI peripheral). Is this possible? Can my code on CC2640 run even when 32khz crystall is not running ?

    Also can you please let me know what is the expected peak to peak voltage swing ? I am suprised that it is always on. How internal oscillator of the second chip can affect the operation of the crystal ? Both terminals of 32khz crystal is connected to CC2640, however, I am just connecting output side of the crystal to the other chip's 32khz crystall input.

    Thank you a lot for your help.
  • Hi,

    It's not recommended to probe the crystal. what you can do is route the xtal signal out to any GPIOs by adding the following lines into your SW(also you need to include the files)

    IOCPortConfigureSet(IOIDn, IOC_PORT_AON_CLK32K, IOC_STD_OUTPUT);
    AONIOC32kHzOutputEnable();

    Also you can check your current consumption to see if your device is able to enter standby mode, which the whole system runs of either XOSCLF or RCOSCLF.
  • Hi Christian

    Thank you for your reply.

    I am trying to tie 32khz clock to IOID_3 but I could not figure out which header files should I add. Can you please specify those files ?

    Also, I am putting those two lines inside main() right before BIOS_start(); Is it ok ?

    Thank you

    Kerem
  • Hey everyone,

    Thank you a lot, I figured out the header files and now using one pin to output 32khz to my second chip. For my own application's need, it would be great if I can increase the current that is supplied to 32khz crystall by CC2640. Is this possible ? Is there any special function of TI-RTOS so that I can use to increase the current/voltage applied on 32khz crystall pins ?

    Any suggestion is deeply appreciated. I searched internet to understand whether it is possible or not but I came up with nothing.

    Many thanks

    Kerem

  • Hi Kerem,

    I think you mean to "increase the driving current of clock output", right?
    What is device you need to drive by the 32kHz output?
  • Hi Chen,

    Thank you for the response, I need to drive a sensor Analog Front End(AFE) chip with 32khz. When I connect the 32khz output to AFE, the signal is being slightly distorted. I thought it has to do with the current driving the crystall. Thats why I wanted to increase the driving current of clock output but I do not know whether there is such a feature. I am using CC2640 chips.

    Thank you,

    Kerem