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.

SPI write feasible before or during a connection event?

Other Parts Discussed in Thread: CC2541

I have a cc2541 communicating over SPI wit an accelerometer.

So far I have used HCI_EXT_ConnEventNoticeCmd to read and write over SPI after a connection event to keep current consumption low. When I activate the accelerometer (which takes one SPI write) it takes a few milliseconds to provide reliable data. Best practice to reduce current consumption would be activate the accelerometer right before the connection event or somewhere at the beginning of a connection event so that the acceleromter could settle during the connection event and would be ready to be read afterwards.

Any thought how this could be done?

Best Regards.

  • Let's say that X (millisecond) represents the interval between two sequential connection.

    In the end of connection open timer execution with timeout of X-DELTA (milliseconds) which

    sets some event where the Accelerometer is powered up and gets stable. 

  • Thank you for your response.

    I had something similar in mind but had some concerns with that approach:

    The code that is executed before the connection event only consumes 800 ticks at 32mhz. I want to conserve as much power as possbile (no cpu idle time till RF event). Thus, timer execution with timeout of X-DELTA has to be very accurate. Although i can get accurate timings for the next RF event with LL_TimeToNextRfEvent I dont think it is accurate enough when using osal_start_timerEx, is it?