USBSERVICE + serout2 problem


Results 1 to 40 of 52

Threaded View

  1. #38
    Join Date
    Dec 2007
    Location
    Paris
    Posts
    101

    Default Re: USBSERVICE + serout2 problem

    A bit more debugging, it seems that only the USBIN side does crash.

    Code:
    '*******************************************************
    'Reading incoming data from USB port
    '*******************************************************
    DoUSBIn:
    
    FOR counter = 1 TO USBBufferSizeMax 'Clear the USB buffer before data is received
        USBBuffer [counter - 1] = 0
    NEXT COUNTER
    
    WHILE !RX_READY                                                                   
        GOSUB UpdateLEDStatus
    WEND
                                       
    IF RX_READY THEN
        RX_READY = 0 'Clear USB data received flag
        USBBufferCount = USBBufferSizeRX
        USBIn 3, USBBuffer, USBBufferCount, DoUSBIn    
    ENDIF
    
    RETURN
    At random the UpdateLEDStatus subroutine stop to be serviced, and the USBIN does not receive anymore data. When it crashes, RX_READY = 0, then if I send data RX_READY = 1 and just stay there, without being cleared. the USBOUT side toes work well though, even when the IN side has crashed.

    Might have something to do with USB_ASM_Service.pbp not working properly?

    -> A bit more debug introducing some LED blink to see if the USB_ASM_Service is being called: it stops being called when it crashes...
    Last edited by aberco; - 10th December 2011 at 21:15.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts