Skip to content
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

Fix IRQ enabled in serial_irq_set() #1603

Merged
merged 1 commit into from
Mar 17, 2016
Merged

Conversation

arnaudrichard
Copy link
Contributor

This is resolution of #1586
UART_IT_TC was enabled instead of UART_IT_TXE
This was causing an issue because UART_IT_TXE (and not UART_IT_TC) was disabled by same function.
Consequently if a transfer was ongoing when serial_irq_set() was called to disable IRQ, UART_IT_TC would still trigger (once).
Side effect is maybe speed: I guess using UART_IT_TC prevented implementation of continuous transfer.
This commit is focused on solving an issue observed with TARGET_STM32F4. It doesn't presume it should or shouldn't be done for other targets.

 UART_IT_TC was enabled instead of UART_IT_TXE
 This was causing an issue because UART_IT_TXE (and not UART_IT_TC) was disabled  by same function.
  Consequently if a transfer was ongoing when serial_irq_set() was called to disable IRQ, UART_IT_TC would still trigger (once).
 Side effect is maybe speed: I guess using UART_IT_TC prevented implementation of continuous transfer.
 This commit is focused on solving an issue observed with TARGET_STM32F4. It doesn't presume it should or shouldn't be done for other targets.
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 10, 2016

@bcostm @adustm

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 10, 2016

@arnaudrichard
Copy link
Contributor Author

Done.

From: Martin Kojtal [mailto:notifications@github.com]
Sent: jeudi 10 mars 2016 16:15
To: mbedmicro/mbed
Cc: Arnaud RICHARD
Subject: Re: [mbed] Fix IRQ enabled in serial_irq_set() (#1603)

@arnaudrichardhttps://github.com/arnaudrichard Please sign https://developer.mbed.org/contributor_agreement/


Reply to this email directly or view it on GitHubhttps://github.com//pull/1603#issuecomment-194898342.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 14, 2016

What about the line 95, does your patch affects that line:

__HAL_UART_DISABLE_IT(handle, UART_IT_TC|UART_IT_TXE);

cc @bcostm

@arnaudrichard
Copy link
Contributor Author

__HAL_UART_DISABLE_IT(handle, UART_IT_TC|UART_IT_TXE);
looks good to me and should not be affected by my patch.

cc @bcostmhttps://github.com/bcostm

From: Martin Kojtal [mailto:notifications@github.com]
Sent: lundi 14 mars 2016 17:24
To: mbedmicro/mbed
Cc: Arnaud RICHARD
Subject: Re: [mbed] Fix IRQ enabled in serial_irq_set() (#1603)

What about the line 95, does your patch affects that line:

__HAL_UART_DISABLE_IT(handle, UART_IT_TC|UART_IT_TXE);

cc @bcostmhttps://github.com/bcostm


Reply to this email directly or view it on GitHubhttps://github.com//pull/1603#issuecomment-196395845.

0xc0170 added a commit that referenced this pull request Mar 17, 2016
Fix IRQ enabled in serial_irq_set()
@0xc0170 0xc0170 merged commit 0a0fcbb into ARMmbed:master Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants