Re: [riot-devel] rtc alarm running with threads

2017-10-20 Thread Paula Ortega Cancino
Hi Kaspar,

I'm running on stm32-l1, board nucleo-152RE

Paula

2017-10-20 18:13 GMT-03:00 Kaspar Schleiser :

> Hi Paula,
>
> on which platform are you running your application?
>
> Kaspar
>
> On 10/20/2017 09:45 PM, Paula Ortega Cancino wrote:
> > Hi Oleg,
> >
> > Thanks for your help. I should mention that i'm working on the 2017.07
> > release. This is the main functions of the code, the behavor i'm
> > expecting is to trigger the alarm every TIME_WAITING seconds, run
> > sale_test() and the go back to the control thread. However i get a
> > kernel panic or run only the control_thread, without considering the
> > rtc_alarm after a while.
> >
> > char stack[THREAD_STACKSIZE_DEFAULT];
> > kernel_pid_t control_pid;
> >
> > int sale_test(void){
> > DEBUG("Send sale\n");
> > return 1;
> > }
> >
> > /* set interrupt event every TIME_WAITING  = 10 seconds*/
> > static void onInterruptEvent(void *arg)
> > {
> > (void)arg;
> > struct tm time;
> > rtc_get_alarm();
> >
> > /* schedule next message */
> > time.tm_sec  += TIME_WAITING;
> > /* Make an interrupt */
> > sale_test();
> >
> > rtc_clear_alarm();
> > rtc_set_alarm(, onInterruptEvent, 0);
> > }
> >
> > void *control_thread(void *arg)
> > {
> > (void) arg;
> > while (1) {
> >   DEBUG("Running thread right now\n");
> >   xtimer_usleep(10);
> > }
> > return NULL;
> > }
> >
> > int main(void)
> > {
> > printf("This test will display 'Alarm every %i seconds'\n",
> > TIME_WAITING);
> >
> > /* initialize rtc functions */
> > application_init();
> >
> > onInterruptEvent(NULL);
> >
> > control_pid = thread_create(stack, sizeof(stack),
> > THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
> > control_thread, NULL, "control");
> > (void) control_pid;
> >
> > return 0;
> > }
> >
> > Cheers,
> > Paula
> >
> > 2017-10-19 14:41 GMT-03:00 Oleg Hahm  > >:
> >
> > Dear Paula,
> >
> > can you share the code of your application somewhere? That might
> > help to find
> > the issues. I would suppose that the interrupt handler is faulty or
> > consumes
> > too much memory or something like this.
> >
> > I think start debugging with a basic application that just prints
> > some text
> > whenever a message from the RTC interrupt is received is a smart
> > idea. Now, we
> > need to figure out what exactly triggers the kernel panic. Are you
> > compiling
> > your application with the DEVELHELP macro enabled? And which port
> > are you
> > using? Maybe you can use `make debug` to get more information.
> >
> > Cheers,
> > Oleg
> > --
> > /* Fuck, we are miserable poor guys... */
> > linux-2.6.6/net/xfrm/xfrm_algo.c
> >
> > ___
> > devel mailing list
> > devel@riot-os.org 
> > https://lists.riot-os.org/mailman/listinfo/devel
> > 
> >
> >
> >
> >
> > ___
> > devel mailing list
> > devel@riot-os.org
> > https://lists.riot-os.org/mailman/listinfo/devel
> >
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] rtc alarm running with threads

2017-10-20 Thread Kaspar Schleiser
Hi Paula,

on which platform are you running your application?

Kaspar

On 10/20/2017 09:45 PM, Paula Ortega Cancino wrote:
> Hi Oleg,
> 
> Thanks for your help. I should mention that i'm working on the 2017.07
> release. This is the main functions of the code, the behavor i'm
> expecting is to trigger the alarm every TIME_WAITING seconds, run
> sale_test() and the go back to the control thread. However i get a
> kernel panic or run only the control_thread, without considering the
> rtc_alarm after a while.
> 
> char stack[THREAD_STACKSIZE_DEFAULT];
> kernel_pid_t control_pid;
> 
> int sale_test(void){
>     DEBUG("Send sale\n");
>     return 1;
> }
> 
> /* set interrupt event every TIME_WAITING  = 10 seconds*/
> static void onInterruptEvent(void *arg)
> {
>     (void)arg;
>     struct tm time;
>     rtc_get_alarm();
> 
>     /* schedule next message */
>     time.tm_sec  += TIME_WAITING;
>     /* Make an interrupt */
>     sale_test();
> 
>     rtc_clear_alarm();
>     rtc_set_alarm(, onInterruptEvent, 0);
> }
> 
> void *control_thread(void *arg)
> {
>     (void) arg;
>     while (1) {
>   DEBUG("Running thread right now\n");
>   xtimer_usleep(10);
>     }
>     return NULL;
> }
> 
> int main(void)
> {
>     printf("This test will display 'Alarm every %i seconds'\n",
> TIME_WAITING);
> 
>     /* initialize rtc functions */
>     application_init();
> 
>     onInterruptEvent(NULL);
> 
>     control_pid = thread_create(stack, sizeof(stack),
>     THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
>     control_thread, NULL, "control");
>     (void) control_pid;
> 
>     return 0;
> }
> 
> Cheers,
> Paula
> 
> 2017-10-19 14:41 GMT-03:00 Oleg Hahm  >:
> 
> Dear Paula,
> 
> can you share the code of your application somewhere? That might
> help to find
> the issues. I would suppose that the interrupt handler is faulty or
> consumes
> too much memory or something like this.
> 
> I think start debugging with a basic application that just prints
> some text
> whenever a message from the RTC interrupt is received is a smart
> idea. Now, we
> need to figure out what exactly triggers the kernel panic. Are you
> compiling
> your application with the DEVELHELP macro enabled? And which port
> are you
> using? Maybe you can use `make debug` to get more information.
> 
> Cheers,
> Oleg
> --
> /* Fuck, we are miserable poor guys... */
>         linux-2.6.6/net/xfrm/xfrm_algo.c
> 
> ___
> devel mailing list
> devel@riot-os.org 
> https://lists.riot-os.org/mailman/listinfo/devel
> 
> 
> 
> 
> 
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
> 
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Mikroelectronik lora flip and click

2017-10-20 Thread Ilias Seitanidis
Thank you very much for your reply!
--

Dear all,
I want to use the microlectronik lora flip and click with a samr21 xplained
pro board in order to transfer the ieee802.15.4 traffic over lora to the
internet.

The mikrolectronika lora flip and click is based on a microchip rn2483
module so, with this PR [1] it's certainly possible to use it with a SAM21
XPlained pro board.

Has anyone tried something like this, is this possible with riot?

I never tried that but it sounds interesting. You will have to take care of
the size and frequency of the packets you want to send via LoRaWAN. Under
certain conditions, the access to the physical layer is very limited
compared to 802.15.4.

Alex

[1] https://github.com/RIOT-OS/RIOT/pull/7505


Best regards,
Ilias

___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel



___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] Mikroelectronik lora flip and click

2017-10-20 Thread Alexandre Abadie
Hi, 

- Mail original -

> Dear all,
> I want to use the microlectronik lora flip and click with a samr21 xplained
> pro board in order to transfer the ieee802.15.4 traffic over lora to the
> internet.

The mikrolectronika lora flip and click is based on a microchip rn2483 module 
so, with this PR [1] it's certainly possible to use it with a SAM21 XPlained 
pro board. 

> Has anyone tried something like this, is this possible with riot?

I never tried that but it sounds interesting. You will have to take care of the 
size and frequency of the packets you want to send via LoRaWAN. Under certain 
conditions, the access to the physical layer is very limited compared to 
802.15.4. 

Alex 

[1] https://github.com/RIOT-OS/RIOT/pull/7505 

> Best regards,
> Ilias

> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] rtc alarm running with threads

2017-10-20 Thread Paula Ortega Cancino
Hi Oleg,

Thanks for your help. I should mention that i'm working on the 2017.07
release. This is the main functions of the code, the behavor i'm expecting
is to trigger the alarm every TIME_WAITING seconds, run sale_test() and the
go back to the control thread. However i get a kernel panic or run only the
control_thread, without considering the rtc_alarm after a while.

char stack[THREAD_STACKSIZE_DEFAULT];
kernel_pid_t control_pid;

int sale_test(void){
DEBUG("Send sale\n");
return 1;
}

/* set interrupt event every TIME_WAITING  = 10 seconds*/
static void onInterruptEvent(void *arg)
{
(void)arg;
struct tm time;
rtc_get_alarm();

/* schedule next message */
time.tm_sec  += TIME_WAITING;
/* Make an interrupt */
sale_test();

rtc_clear_alarm();
rtc_set_alarm(, onInterruptEvent, 0);
}

void *control_thread(void *arg)
{
(void) arg;
while (1) {
  DEBUG("Running thread right now\n");
  xtimer_usleep(10);
}
return NULL;
}

int main(void)
{
printf("This test will display 'Alarm every %i seconds'\n",
TIME_WAITING);

/* initialize rtc functions */
application_init();

onInterruptEvent(NULL);

control_pid = thread_create(stack, sizeof(stack),
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
control_thread, NULL, "control");
(void) control_pid;

return 0;
}

Cheers,
Paula

2017-10-19 14:41 GMT-03:00 Oleg Hahm :

> Dear Paula,
>
> can you share the code of your application somewhere? That might help to
> find
> the issues. I would suppose that the interrupt handler is faulty or
> consumes
> too much memory or something like this.
>
> I think start debugging with a basic application that just prints some text
> whenever a message from the RTC interrupt is received is a smart idea.
> Now, we
> need to figure out what exactly triggers the kernel panic. Are you
> compiling
> your application with the DEVELHELP macro enabled? And which port are you
> using? Maybe you can use `make debug` to get more information.
>
> Cheers,
> Oleg
> --
> /* Fuck, we are miserable poor guys... */
> linux-2.6.6/net/xfrm/xfrm_algo.c
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
>
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


[riot-devel] Mikroelectronik lora flip and click

2017-10-20 Thread Ilias Seitanidis
Dear all,
I want to use the microlectronik lora flip and click with a samr21 xplained
pro board in order to transfer the ieee802.15.4 traffic over lora to the
internet. Has anyone tried something like this, is this possible with riot?
Thank you in advance!

Best regards,
Ilias
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


[riot-devel] Ethernet connection

2017-10-20 Thread SUBHASIS MAITY cs16m055
Hi all,

Should I use crossed cable for testing ethernet connection using enc28j60
or
normal ethernet cable should work?
I have seen in forums that only with one host with MDIX should allow normal
ethernet cable to work.
But still I need to be certain.

Regards,
Subhasis
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel