Thursday, October 19th 2017, 4:40pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

phlb

Beginner

Date of registration: Nov 17th 2011

Posts: 4

1

Thursday, November 17th 2011, 5:47pm

embOS cortex M3 problem in interrupt with OS_SignalCSema()

Hi,

we have a task that is waiting a signal (OS_WaitCSemaTimed()) from an uart interrupt handler. When the interrupt handler is called the OS_SignalCSema() is used to wake up the task.
the problem is that sometimes all system is freezed in OS_SignalCSema().

note: we use OS_EnterInterrupt() and OS_LeaveInterrupt() in the interrupt handler. there are only one task, and two interrupt source (the first from systick and the second from uart).

we have a trial version of embOS 3.84 for Cortex M3 and IAR version 6.21 on stellaris lm3s9D96.

Thanks in advance for your help.

regards.

SEGGER - Til

Super Moderator

Date of registration: Nov 14th 2007

Posts: 256

2

Friday, November 18th 2011, 8:52am

Hello,

which interrupt priority has your uart interrupt handler?
Is it possible to send us a project with which we can reproduce this problem?

Regards,
Til

phlb

Beginner

Date of registration: Nov 17th 2011

Posts: 4

3

Friday, November 18th 2011, 2:06pm

Hello,

Priorities are set to default value (0) for both interrupt.

We replace semaphore by event mechanism and it works correctly (OS_SignalEvent(), OS_WaitEventTimed() ). Strange ... . If this information can help you?

thanks,

Regards.

phlb.

SEGGER - Til

Super Moderator

Date of registration: Nov 14th 2007

Posts: 256

4

Friday, November 18th 2011, 3:15pm

Hello,

please be aware that with Cortex M3 the value 0 is the highest interrupt priority!
You must not call embOS API functions from zero latency interrupts.
Zero latency interrupts (or also called fast interrupts) are interrupts with an interrupt priority < 128.
Please have a look in the embOS CPU/Compiler specific manual for more details.

Could you please check it and let me know if this solves your problem?

Regards,
Til

phlb

Beginner

Date of registration: Nov 17th 2011

Posts: 4

5

Friday, November 18th 2011, 6:38pm

Hello,

It works!!! thanks for your help and sorry, I didn't read the documentation correctly about interrupts priority and embOS API.

we have another problem at start up with embOS 3.84, I'm going to create another thread about it.

Thanks very much.

Regards.

phlb.