Quantcast
Channel: [SOLVED] 18F4550 USB, can't get TRNIF interrupt
Viewing all articles
Browse latest Browse all 4

Re: 18F4550 USB, can't get TRNIF interrupt (Daniel)

$
0
0
[SOLVED]
 
 
The problem  has been solved by CLEARING the whole STAT byte of the endpoint0 (in and out) buffer descriptors BEFORE configure the buffer descriptor.
 
The ordering is like this (in bus reset interrupt handling):
 
RSTIF ?
- Clear UIR and UEIR
- UEP0 configure
- Clear TRNIF queue (by looping like:  while( URI.TRNIF ){ UIR.TRNIF = 0; } )
- Clear PKTDIS
- Clear EP0_BD_OUT.STAT  ( = 0x00 )
- Clear EP0_BD_INT.STAT  ( = 0x00 )
- Configure EP0_BD_OUT.ADDR
- Configure EP0_BD_OUT.CNT
- Configure EP0_BD_OUT.STAT ( =0x88 ) [ give the BD to the SIE ]

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images