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

UART_OPTIMIZED flag seems to be not correctly used #13

Closed
jmchiappa opened this issue Jun 6, 2017 · 2 comments
Closed

UART_OPTIMIZED flag seems to be not correctly used #13

jmchiappa opened this issue Jun 6, 2017 · 2 comments
Labels

Comments

@jmchiappa
Copy link
Contributor

Hi all,
in uart.c file, UART_OPTIMIZED is defined and set to 0 in order to not use the optimization.
But all tests are based on #ifdef UART_OPTIMIZED, and of course, the evaluation of the expression is true (even if UART_OPTIMIZED is set to 0, the UART_OPTIMIZED flag is defined).

When I replace
#define UART_OTPIMIZED 0
by
#undef UART_OPTIMIZED
the behavior is really strange. UART Rx callback fall in error 0x08 or 0x05 sometimes.
void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart) { uart_id_e uart_id = get_uart_id_from_handle(huart); if(NB_UART_MANAGED == uart_id) { return; } printf(">>UART Error callback uart id %i : ErrorCode=0x%x\n\r",uart_id,huart->ErrorCode); while(1); uart_deinit(uart_id); uart_init(uart_id, g_UartHandle[uart_id].Init.BaudRate); }
Do you have any idea why the code falls in error ?

Thank you,
Jean-Marc

@fpistm fpistm assigned ghost Jun 6, 2017
@fpistm fpistm added the Bug 🐛 label Jun 6, 2017
@fpistm
Copy link
Member

fpistm commented Jun 7, 2017

Hi @jmchiappa ,
Since this commit:
Rework Serial with new pin management
UART_OTPIMIZED is no more use at least for this core.
On which repo you work?
Thanks in advance

@jmchiappa
Copy link
Contributor Author

jmchiappa commented Jun 7, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants