Search found 8 matches

by Thiapalm
Sat Sep 13, 2014 2:14 am
Forum: General Support
Topic: Thread limit?
Replies: 1
Views: 2093

Thread limit?

Hello,

I wonder if there is any thread limit on Chibios?

I am currently running a 3 thread project on an AVR (ATMEGA328P) with 2k of RAM and wenever I try to activate a fourth thread, it simply does not run at all. If I change initialization position on mainthread, then, the last one is never ...
by Thiapalm
Fri Sep 12, 2014 5:56 pm
Forum: AVR Support
Topic: EventHandlers not responding
Replies: 6
Views: 6375

Re: EventHandlers not responding

No reason at all, I simply did not know where to start them.

So If I put the

Code: Select all

chEvtInit(&controllerEvt);
and

Code: Select all

chEvtRegister(&controllerEvt, &ledListener, OPERATE_LED);
on the mainthread, that code will work?
by Thiapalm
Thu Sep 11, 2014 1:55 am
Forum: AVR Support
Topic: EventHandlers not responding
Replies: 6
Views: 6375

EventHandlers not responding

Hello,

I am trying to use an Event to activate a thread. The event is fired after some timeout from Thread1 and Thread2 must receive it and act accordingly.

I have implemented both threads as below, however Thread2 is not being activated. Could someone helpe and point me on the code below where ...
by Thiapalm
Mon Sep 08, 2014 9:19 pm
Forum: AVR Support
Topic: chTimeNow() does not seem to be working
Replies: 8
Views: 7900

Re: chTimeNow() does not seem to be working

Thanks for the help Utzig.

The Xbee library uses the HardwareSerial for communication, I have not written the lib, but as far as I can see, it has no interaction with Timer0 whatsoever.

...the softwareserial on the other hand, is using PD4 as RX and PD5 as TX pins, from the datasheet PD4 and PD5 ...
by Thiapalm
Mon Sep 08, 2014 7:28 pm
Forum: AVR Support
Topic: chTimeNow() does not seem to be working
Replies: 8
Views: 7900

Re: chTimeNow() does not seem to be working

Now I have re-enabled thread4, but removed all things related to the hardwareserial (UART) and added some strings to keep RAM usage at the same level.

The chTimeNow() on this scenario is working as it should. So it seems to me that somehow, the HardwareSerial from Arduino is interfering with the ...
by Thiapalm
Mon Sep 08, 2014 6:52 pm
Forum: AVR Support
Topic: chTimeNow() does not seem to be working
Replies: 8
Views: 7900

Re: chTimeNow() does not seem to be working

Yes, I'm using the arduino version, but the board is of my design, it is based on Atmega328P-AN.

I am programming it via ICSP and de Serial is connected to a communication device. Since I don't have a debugger, I need to use the softserial to perform such verification.

I have checked the RAM (just ...
by Thiapalm
Mon Sep 08, 2014 6:07 pm
Forum: AVR Support
Topic: chTimeNow() does not seem to be working
Replies: 8
Views: 7900

Re: chTimeNow() does not seem to be working

Down below you can see the SETUP and MAIN, as for the Tick frequency, I have not changed anything on the default values, the AVR is running on 16Mhz.

There are some constants and global variables defined not shown here, but none of then related to OS or chTimeNow.

void mainThread() {

#ifdef DEBUG ...
by Thiapalm
Mon Sep 08, 2014 5:26 pm
Forum: AVR Support
Topic: chTimeNow() does not seem to be working
Replies: 8
Views: 7900

chTimeNow() does not seem to be working

Hello,

I have a 4 thread program, where the "main" thread waits for a given time before starting actions on the other 3. However, only the "main" thread keeps running.


This is the thread (just the basics):

static WORKING_AREA(waThread3, 64);

static msg_t mainP(void *arg) {

systime_t time ...