/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Is it possible to switch off the MEMS sensor programmatically?

Username:     
Password:     
             

Forum
  • Index
  •  » circleOS
  •  » Is it possible to switch off the MEMS sensor programmatically?

# 1   2011-10-11 11:57:24 Is it possible to switch off the MEMS sensor programmatically?

johnja9
New member
Registered: 2011-05-13
Posts: 6

Is it possible to switch off the MEMS sensor programmatically?

I am writing a small CircleOS project, on the STM32F103 EvoPrimer that mixes USB-HID with an I2C sensor. I see from previous forum posts that I2C clashes with the MEMS sensor, and can successfully built a I2C-only test project. Now I am trying to add USB-HID into the project, and see that the USB pull-up signal, GPIO PD3, also clashes with the MEMS on the STM32 FSMC.

I can switch the MEMS off via the CircleOS GUI, before application start-up, but is there a way to switch MEMS off programmatically, as switching it off via the FSMC also impacts the LCD display.

Regards

John

Last edited by johnja9 (2011-10-11 12:16:11)

Offline

 

# 2   2011-10-12 07:11:25 Is it possible to switch off the MEMS sensor programmatically?

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Is it possible to switch off the MEMS sensor programmatically?

The MEMS handler is called by the TIM2 interrupt.
So, in order to switch off the MEMS management, you can disable the TIM2 interrupt, with this command : 
    TIM_DeInit( TIM2 );

and recall after operation with :
    TIM_Cmd( TIM2, ENABLE );
    TIM_ITConfig( TIM2, TIM_IT_Update, ENABLE );

Offline

 

  • Index
  •  » circleOS
  •  » Is it possible to switch off the MEMS sensor programmatically?

Board footer