/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / How to comunicate the Application with the Circle OS

Username:     
Password:     
             

Forum
  • Index
  •  » circleOS
  •  » How to comunicate the Application with the Circle OS

# 1   2009-04-30 18:43:51 How to comunicate the Application with the Circle OS

bruno montanari
New member
Registered: 2009-03-10
Posts: 5

How to comunicate the Application with the Circle OS

Hi,

I need some help here. I want to set a flag every time the Timer2 Interrupt occurs, and this same flag has to be ready on my application. In a more generic way, I need to use the same flag on two different projects, one is the Circle OS and the other is the Mems application.

I've tried many things and didn't managed to work this out.

Please, let me know if someone have already done this before.

Thanks!

Offline

 

# 2   2009-05-01 09:54:26 How to comunicate the Application with the Circle OS

Saulis
Member
From: Lithuania
Registered: 2009-04-09
Posts: 34

Re: How to comunicate the Application with the Circle OS

replace tim2 handler with your handler, by copying it from circle source and adding your flag. problem is that if OS changes, your app may not work.
Thus you need to restore old handler at exit.
basically

#define TIM3_IRQ   (0xB4)

void TIM3Handler(void)
{
  ...
}

in app_init:
  //Set IRQ Handler for TIM3
  OldHandlerTIM = (tHandler)UTIL_GetIrqHandler( TIM3_IRQ ); // read current address
  UTIL_SetIrqHandler(TIM3_IRQ, (tHandler)TIM3Handler);


on exit:
  UTIL_SetIrqHandler(TIM3_IRQ, OldHandlerTIM);

Offline

 

# 3   2009-05-04 06:04:41 How to comunicate the Application with the Circle OS

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: How to comunicate the Application with the Circle OS

and call  OldHandlerTIM  within your own handler.

Offline

 

# 4   2009-05-12 17:22:20 How to comunicate the Application with the Circle OS

bruno montanari
New member
Registered: 2009-03-10
Posts: 5

Re: How to comunicate the Application with the Circle OS

Thanks!

Offline

 

  • Index
  •  » circleOS
  •  » How to comunicate the Application with the Circle OS

Board footer