Page 2 of 2

Re: STM32F030 and SPWF01 WiFi Module

Posted: Tue Dec 15, 2015 7:57 pm
by Tabulous
Giovanni wrote:The timeout does not matter, it is the execution time of those handlers that you should verify. If you don't get data fast enough the queue will fill.

Giovanni


Code: Select all

        chEvtWaitOneTimeout(EVENT_MASK(1), MS2ST(1));


in my code having this set to MS2ST(1) makes a difference, dont get any overruns, normally i'd have this set to MS2ST(10) but this gives overruns.

i've currently also got the uart interrupt priority at 1 and the

Code: Select all

#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE         128
#endif

Re: STM32F030 and SPWF01 WiFi Module

Posted: Tue Dec 15, 2015 8:15 pm
by Giovanni
This means that you are not getting the event, you just exit from the wait because timeout.

Anyway, probably this is the problem:

chEvtRegister(chnGetEventSource(&SD2), &elModemdata, EVENT_MASK(1));

It should be:

chEvtRegisterMask(chnGetEventSource(&SD2), &elModemdata, EVENT_MASK(1));

because you are registering a mask of events not an event id.

Try using TIME_INFINITE as timeout and confirm that you are getting an event.

Giovanni