Hello.
I am trying to use CDC USB driver on RM48L9520 for serial communication with PC. I based my code on HALCoGen USB Device - driver & CDC Class. All seems to work fine while USB cyclic buffer is not full.
When the cyclic buffer is almost full and next message needs to be split to occupy the remining space at the end of the buffer and some space at the begining of the buffer the program hangs and microcontroler can not be halted (I am using XDS100v2 USB Emulator).
While stepping code line after line I can see that in function USBEndpointDataGet transferring data from USB hardware to the end of the buffer works fine, but before program writes to the begining of the buffer Windows USB virtual serial driver hangs (probably due to timing problems related to step execution of microcontroler program) and next attempt to transfer data from USB hardware results in program entring _dabort section.
During normal execution Windows driver does not hang but breakpoint after call to function USBEndpointDataGet can not be reached for the second time (that is after writting to the begining of the cyclic buffer).
Does anybody encountered similar problem or can suggest solution?