This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with receive/can_send functions


Thanks Gary. Please note my notes below.

> On Sun, 2005-08-07 at 18:43 -0700, mkhoyila@uci.edu wrote:
>> I have traced my issue to following:
>>
>> Since my board is proprietary board, In plf_misc.c, I check for
>> interrupts. From there I can call my ethernet driver XXXX_ISR which does
>> not do me good. I need eCos to get involved and call my XXXX_ISR. How
>> would pass this interrupt happening to eCOS to call my XXXX_ISR and
>> subsequently participate and call other needed functions. Thanks.
>>
>
> What you need to do is provide the appropriate HAL structures to handle
> interrupts on your board.  Look at any of the other [many] ports and you
> should be able to see how this is done - basically, the HAL needs to
> define a set of interrupts which correspond to actual device/chip
> interrupts.  You need functions to mask, unmask, configure and test
> for such interrupts.

So far I have done all this.

  Then it becomes simple for your driver to "hook"
> up to the proper interrupt for your ethernet device and eCos will take
> care of the rest.

How does my ethernet driver "hook" to this interrupt. I think my problem
is in "registering the interrupt service handling". more specifically in
function "cyg_drv_interrupt_create". I think I am passing wrong
parameter!!

>
> Look at the HAL porting guide for the details, or as I mentioned, any
> of the many existing ports.
>
>> Michael
>>
>>
>> > Thanks for the help.
>> >
>> > My application is just print "Hello world " which it does just fine.
>> My
>> > goal is to have ping work so I could benchmark the performace of eCos
>> vs
>> > Linux.
>> >
>> > 1) Since I'm new to device driver/eCos, I followed the code in
>> if_atlas.c.
>> > I do not think that I am setting my XXXX_int_vector to rxIrq properly,
>> > since eCos does not recognize the interrupt generated by DMA. Is there
>> any
>> > other thing I need to do beside what is in if_atlas.c? Is there any
>> other
>> > file that communicates with eCos modules to let it know that there is
>> an
>> > iterrupt and it should call XXXX_isr? I only saw if_atlas.c and
>> saa9730.h
>> > files.
>> >
>> > 2) When I initially bring up the board and load eCos, I can ping the
>> board
>> > 1 or two times. I captured the ping reply and it has my board's mac
>> > address. However, my XXXX_recv function is never called (I have debug
>> > statements right at the begining of all XXXX_ functions). How is this
>> > possible?
>> >
>> > Any help is appreciated to guide me thru.
>> >
>> >
>> >
>> >> On Thu, 2005-08-04 at 20:51 -0700, mkhoyila@uci.edu wrote:
>> >>> Hi everyone
>> >>>
>> >>> I have coded an ethernet driver for mips dsl board. I have following
>> >>> issues:
>> >>>
>> >>> 1) XXX_can_send  function is being repeatedly called. There is no
>> I/O
>> >>> activity that I generate. Is this normal?
>> >>
>> >> This function will be called as long as there are data [packets]
>> waiting
>> >> to be sent out over the interface.
>> >>
>> >>> 2) On receive side, I notice that DMA engine sets the status bit
>> that
>> >>> buffer has received packet, but eCos never calls my XXXX_receive
>> >>> function.
>> >>> for that matter, it  does not even call XXXX_isr or any other
>> related
>> >>> functions prior callig XXXX_receive. It seems that it does not
>> >>> recognize
>> >>> the interrupt. Any idea?
>> >>
>> >> This is a serious problem and goes together with the transmit issue
>> you
>> >> mentioned above.  You need to figure out why your device is not
>> >> presenting and interrupt and if it is, why the ISR is not being
>> called.
>> >>
>> >> Are you sure that interrupts have been enabled?  What sort of
>> >> application are you running?
>> >>
>> >> --
>> >> ------------------------------------------------------------
>> >> Gary Thomas                 |  Consulting for the
>> >> MLB Associates              |    Embedded world
>> >> ------------------------------------------------------------
>> >>
>> >
>> >
>>
>>
>
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
>



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]