[ECOS]Init-problem with ecos.

Robert Brusa bob.brusa@gmail.com
Mon Apr 6 15:32:00 GMT 2009


On Mon, 06 Apr 2009 17:04:56 +0200, Nick Garnett <nickg@ecoscentric.com>  
wrote:

> Robert Brusa <bob.brusa@gmail.com> writes:
>
>> Hi
>> I encountered problems running my app on my at91sam7x512-based board
>> and  the problem seems to be somewhere in the initialization of
>> ecos. I then  have written a little app which essentially consists of
>>
>> #include <cyg/infra/diag.h>// no other includes
>> void cyg_user_start(void)
>> {
>>      diag_printf("\n%s started\n", thisprog);
>>      myjob(); // consider this a dummy routine for now
>>      diag_printf("\ncmyjob done\n");
>> }
>>
>> When running this app, I get the following output:
>> ��Init device '/dev/ser0'
>> AT91 SERIAL init - dev: fffc0000.6
>> Set output buffer - buf: 0x00202c80 len: 128
>> Set input buffer - buf: 0x00202d00 len: 128
>> Init device '/dev/ser1'
>> AT91 SERIAL init - dev: fffc4000.7
>> Set output buffer - buf: 0x00202d80 len: 128
>> Set input buffer - buf: 0x00202e00 len:
>> 128פԕ���������Ɂ��Í
��ɕ�5)55)5)��������Ɂ�'AT91 SERIAL init - dev:
>> fffc0000.6
>> Set output buffer - buf: 0x00202c80 len: 128
>> Set input buffer - buf: 0x00202d00 len: 128
>> Init device '/dev/ser1'
>> AT91 SERIAL init - dev: fffc4000.7<cut>.... and it repeats this
>>
>> When setting a breakpoint at the call myjob() it is reached, but now
>> output appears on ser1. But debugging this application is tricky,
>> because  it does not show reproducible behaviour. What's going on here?
>
> AT91 serial devices cannot be shared between diagnostics and the
> serial device driver. Both use DMA and once the device driver starts
> it points the DMA engine at its own buffers. The diagnostic code
> doesn't know this and gets thoroughly confused.
>
> You must disable the serial driver completely on the device you want
> to use for diagnostics in the configuration.
>
>
Thank you Nick. This helped indeed. I was not aware of this.
   Robert


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list