when arrived daa on sd1 start a event
if i write this
Code: Select all
static THD_WORKING_AREA(waRead5, 128);
static THD_FUNCTION(Thread5,arg) {
(void)arg;
chRegSetThreadName("th_Riempio_Buffer");
event_listener_t Uart1Data;
eventmask_t activeEvents;
eventflags_t flags;
chEvtRegisterMask((event_source_t *)chnGetEventSource(&SD1), &Uart1Data, EVENT_MASK(1));
while (TRUE) {
activeEvents=chEvtWaitAll(EVENT_MASK(1));
flags =chEvtGetAndClearFlags(&Uart1Data);
if (flags & CHN_INPUT_AVAILABLE)
{
sdWrite(&SD2,"OK\r\n",4);
}
}
return 0;
}
i see only when i reset the board and later i see the event but only just once
if i use this
Code: Select all
if (flags )
{
sdWrite(&SD2,"OK\r\n",4);
}
All work well but i don't have the control of SD1.
If i disconnect the wired, i see start for every time the event, the thread In WTOREVT state
I see this post viewtopic.php?f=16&t=1394
for me code but i don't know the problem,
bye