Jump to content

    
iva33

STM32L4 USB RXFIFO read RXFLVL flag not cleared

Recommended Posts

Все нормально у меня щас код на 80к и проблем нет с использыванием регистеров.


:biggrin::biggrin::biggrin:


Да... 80k кода (не текста) это "не петшуки на палочке леденцовые сосать" (-8Ж

Share this post


Link to post
Share on other sites

Всем доброго ещё раз,
Кто подскажет если ответ на device_deskriptor (до адреса) будет ошибочным, может ли это быть причинаи отсутствия set_address после планиривона ресета?
после рисета палучаю нулевой  паккет  setup_stage_down вместа 8 битного setup пакета. 
 

Share this post


Link to post
Share on other sites
1 hour ago, VladislavS said:

Нет такого пакета. Вы не путаете со статусом PKTSTS_SETUP_COMP ?

Да вы правы получаю PKTSTS_SETUP_COMP, потом нулевые PKTSTS_OUT_RECEIVED, PKTSTS_OUT_CMPL  и всё начинается заново.

Share this post


Link to post
Share on other sites

Посмотрите мой пример. Там видно на какой статус что надо делать. Лишние прерывания отключите. Если вдруг, когда-нибудь поймёте,, что жить без них не можете - включите.

Share this post


Link to post
Share on other sites

Вот такая последовательность обмена.

Int_USBRST
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> GET_Device_Descriptor 64 bytes
Int_OEPINT EP0 XFRC ZLP Received
Int_USBRST
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> SET_ADDRESS 6
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> GET_Device_Descriptor 18 bytes
Int_OEPINT EP0 XFRC ZLP Received
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> GET_Configuration_Descriptor 255 bytes
Int_OEPINT EP0 XFRC ZLP Received
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> GET_String_Descriptor 0x3 255 bytes
Int_OEPINT EP0 XFRC ZLP Received
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> GET_String_Descriptor 0x0 255 bytes
Int_OEPINT EP0 XFRC ZLP Received
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> GET_String_Descriptor 0x2 255 bytes
Int_OEPINT EP0 XFRC ZLP Received
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> GET_Device_qualifier_Descriptor 10 bytes
Int_OEPINT EP0 XFRC ZLP Received
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> SET_CONTROL_LINE_STATE
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> GET_LINE_CODING
Int_OEPINT EP0 XFRC ZLP Received
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> SET_LINE_CODING
Int_RXFLVL EP0 DATA_UPDT CNT=7
SET_LINE_CODING DATA
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> GET_LINE_CODING
Int_OEPINT EP0 XFRC ZLP Received
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> SET_CONTROL_LINE_STATE
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> SET_LINE_CODING
Int_RXFLVL EP0 DATA_UPDT CNT=7
SET_LINE_CODING DATA
Int_RXFLVL EP0 SETUP_UPDT CNT=8
Int_OEPINT EP0 STUP -> GET_LINE_CODING
Int_OEPINT EP0 XFRC ZLP Received

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.