Hi,
is the sdWrite function blocking until the data is transferred? In my application it does not block.
I use my own task scheduler and the osless-osal. When i get a task overrun the software shall lead into an endless loop until the watchdog gets active. Before entering this loop i want to disable the interrupts globally by osalSysDisable().
Before disabling the interrupt i want to send an error message via the serial driver. But i just get a few letters...
Thanks
sdWrite behavoir
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: sdWrite behavoir
Hi,
sdWrite() blocks until all the data has been written on the output buffer, this does not mean actually transmitted.
If you need to synchronize with the physical transmission look for the serial driver events, there is an event signalling that
Giovanni
sdWrite() blocks until all the data has been written on the output buffer, this does not mean actually transmitted.
If you need to synchronize with the physical transmission look for the serial driver events, there is an event signalling that
Giovanni
Re: sdWrite behavoir
Hi,
thanks. I wrote a little helper for this usecase:
Maybe it is interesting.
thanks. I wrote a little helper for this usecase:
Code: Select all
#define sdBlockingWrite(sdp, b, n) \
sdp->event.flags &= ~CHN_TRANSMISSION_END; \
oqWriteTimeout(&(sdp)->oqueue, b, n, TIME_INFINITE); \
while((sdp->event.flags & CHN_TRANSMISSION_END) == 0)
Maybe it is interesting.
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: sdWrite behavoir
Hi,
There is no need to poll for the event, you could use event wait functions for this.
Giovanni
There is no need to poll for the event, you could use event wait functions for this.
Giovanni
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: sdWrite behavoir
There is no such function, without OS events are implemented as callbacks. See the details in OSAL.
Giovanni
Giovanni