STM32F030 and SPWF01 WiFi Module

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Tabulous
Posts: 518
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 18 times

Re: STM32F030 and SPWF01 WiFi Module

Post 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
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F030 and SPWF01 WiFi Module

Post 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
Post Reply