Open weisleder opened 8 years ago
Hi, I might have found an error in the serial_irq_handler_asynch(). This only terminat the IRQ if a SERIAL_EVENT_RX_COMPLETE event occurred.
Please have a look at: http://forums.mbed.com/t/stm32f401-async-serial-events/1269 and https://github.com/ARMmbed/mbed-hal-st-stm32f4/blob/master/source/serial_api.c#L645-L655.
So if a SERIAL_EVENT_RX_CHARACTER_MATCH occurred, I get the event but the IRQ is still enabled until a SERIAL_EVENT_RX_COMPLETE is occurred: https://github.com/ARMmbed/mbed-hal-st-stm32f4/blob/master/source/serial_api.c#L635-L643
And than if I use serial_irq_handler_asynch() with SERIAL_EVENT_RX_CHARACTER_MATCH event, than I never get a SERIAL_EVENT_RX_COMPLETE event. Because of this: https://github.com/ARMmbed/mbed-hal-st-stm32f4/blob/master/source/serial_api.c#L659.
But if I have a look to the implementation for the FRDM-K64F Board: https://github.com/ARMmbed/mbed-hal-ksdk-mcu/blob/master/source/serial_api.c#L339-L356 I think they will return also a SERIAL_EVENT_RX_COMPLETE if I used a SERIAL_EVENT_RX_CHARACTER_MATCH with async read. And they abort the async read on every event: https://github.com/ARMmbed/mbed-hal-ksdk-mcu/blob/master/source/serial_api.c#L487-L490
Thanks for reporting, we will investigate.
ARM Internal Ref: IOTSFW-2271
Hi, I might have found an error in the serial_irq_handler_asynch(). This only terminat the IRQ if a SERIAL_EVENT_RX_COMPLETE event occurred.
Please have a look at: http://forums.mbed.com/t/stm32f401-async-serial-events/1269 and https://github.com/ARMmbed/mbed-hal-st-stm32f4/blob/master/source/serial_api.c#L645-L655.
So if a SERIAL_EVENT_RX_CHARACTER_MATCH occurred, I get the event but the IRQ is still enabled until a SERIAL_EVENT_RX_COMPLETE is occurred: https://github.com/ARMmbed/mbed-hal-st-stm32f4/blob/master/source/serial_api.c#L635-L643
And than if I use serial_irq_handler_asynch() with SERIAL_EVENT_RX_CHARACTER_MATCH event, than I never get a SERIAL_EVENT_RX_COMPLETE event. Because of this: https://github.com/ARMmbed/mbed-hal-st-stm32f4/blob/master/source/serial_api.c#L659.
But if I have a look to the implementation for the FRDM-K64F Board: https://github.com/ARMmbed/mbed-hal-ksdk-mcu/blob/master/source/serial_api.c#L339-L356 I think they will return also a SERIAL_EVENT_RX_COMPLETE if I used a SERIAL_EVENT_RX_CHARACTER_MATCH with async read. And they abort the async read on every event: https://github.com/ARMmbed/mbed-hal-ksdk-mcu/blob/master/source/serial_api.c#L487-L490