zephyr/tests/drivers
Paul Sokolovsky b7f6aaaa72 tests: uart_basic_api: Don't assume we can drink from IRQ firehose.
There're (at least) 2 UART TX interrupt causes: "tx fifo has more
room" and "transmission of tx fifo complete". Zephyr API has only
one function to enable TX interrupts, uart_irq_tx_enable(), so it's
fair to assume it enables interrupt for both conditions. But then
immediately after enabling TX IRQ, it will be fired with "tx fifo
has more room" cause. If ISR doesn't do anything to fill FIFO, on
some architectures, immediately after return from ISR, it will be
fired again (with no instruction progress in the main application
thread). That's exactly the situation with this test, and on ARM,
it leads to inifnite IRQ loop.

So, instead move call to uart_fifo_fill() inside ISR, and be sure
to disable TX IRQ after we transmitted enough characters.

Change-Id: Ibbd05acf96b01fdb128f08054819fd104d6dfae8
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-05-02 09:31:36 -04:00
..
adc tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
aio/aio_basic_api tests/ztest: rename assert macros to be zephyr specific 2017-04-13 21:17:33 +00:00
aon_counter/aon_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
build_all x86: exception-assisted panic/oops support 2017-04-22 10:31:49 -04:00
dma tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
enc28j60 kernel: remove all remaining references to nanokernel 2017-04-10 20:21:10 +00:00
gpio/gpio_basic_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
i2c/i2c_api tests/ztest: rename assert macros to be zephyr specific 2017-04-13 21:17:33 +00:00
nsim_uart kernel: remove all remaining references to nanokernel 2017-04-10 20:21:10 +00:00
pci_enum license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
pinmux/pinmux_basic_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
pwm/pwm_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
quark_clock kernel: remove all remaining references to nanokernel 2017-04-10 20:21:10 +00:00
rtc/rtc_basic_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
spi/spi_basic_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00
uart/uart_basic_api tests: uart_basic_api: Don't assume we can drink from IRQ firehose. 2017-05-02 09:31:36 -04:00
watchdog/wdt_basic_api tests: convert to using newly introduced integer sized types 2017-04-21 09:53:49 -05:00