-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USBD dwc_otg register bits fixed for FIFO flush #54
base: master
Are you sure you want to change the base?
USBD dwc_otg register bits fixed for FIFO flush #54
Conversation
+ CGINAK !usbd:flush_fifo - now unsures core not access to fifo before flush - according to stm32f4 RM0090 notes.
@@ -0,0 +1,1692 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is auto generated.
not to be included in git history
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was intruded by mistake from my branch
@@ -99,7 +99,7 @@ bit AHBIDL 31 | |||
bits | |||
name TXFNUM | |||
size 5 | |||
offset 16 | |||
offset 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -495,7 +495,8 @@ reg DCTL 0x804 | |||
bit POPRGDNE 11 | |||
bit CGONAK 10 | |||
bit SGONAK 9 | |||
bit SGINAK 8 | |||
bit CGINAK 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
lib/usbd/backend/usbd_dwc_otg.c
Outdated
@@ -109,12 +109,25 @@ static inline uint16_t get_fifo_depth(usbd_device *dev) | |||
*/ | |||
static void flush_fifo(usbd_device *dev) | |||
{ | |||
// Set Global IN OUT ep NACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C code. "//" is c++ comment style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i also would like to point out https://github.com/insane-adding-machines/unicore-mx/blob/master/HACKING
it is a useful resource for stuff like coding style we accept.
lib/usbd/backend/usbd_dwc_otg.c
Outdated
|
||
const uint32_t GNACKEFF = DWC_OTG_GINTMSK_GINAKEFFM ; // | DWC_OTG_GINTMSK_GONAKEFFM ; | ||
// Wait Global NACK Effective | ||
while ( (REBASE(DWC_OTG_GINTSTS) & GNACKEFF) != GNACKEFF ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while ((REBASE(DWC_OTG_GINTSTS) & GNACKEFF) != GNACKEFF);
extra space.
codebase i see dont have any such space after bracket open or close. we can just stick to it.
…status, waiting for them can hang
some USBD register fields was broken or miss.
also fifo flush routine now more strict prepares for flushing