GPIO demo on STM32F4

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
pinch
Newbie
Posts: 1
Joined: Sun Jan 31, 2016 8:26 pm

GPIO demo on STM32F4

Post by pinch » Mon Feb 01, 2016 9:52 am

I should start by saying that I am a complete noob with RTOS ERIKA, OSEK and STM32, I have only used Arduinos before.
I compiled the GPIO test program from the RT druid/Eclipse and flashed it without problem.
I am now trying to exam the code to learn how it works.
Could someone please explain the switch thats used in the task to toggle the leds.
A ordinary switch only uses 1 case at a time, this uses the alarm to advance 1 case at a time until it reaches MAX_ROUND and then starts over from beginning.
And how does the ACT line work here ?
Is there any documentation about how to use this kind of programming ?

Thanks in advance for your help to get me to understand this.

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: GPIO demo on STM32F4

Post by paolo.gai » Wed Feb 03, 2016 7:54 pm

There are a few differences between Arduino Sketch programming and an OSEK/VDX Kernel.

Just check the ScicosLab 2008 workshop in the wiki, there are a few PDF slides on ERIKA which may help.

The demo you are referring to is executing 1 case for each activation of the task. at the end of the function, the task will be terminated, and will be restarted only after a while by the Alarm. In other words, it is not a "forever loop" like you have in the Arduino sketch.

Ciao,

Paolo

Post Reply