Closed pdunaj closed 5 years ago
btw - why device information is stored in RAM not in ROM?
(gdb) p info
$2 = (struct device *) 0x20005d3c <__device_sys_init_uart_console_init0>
when I traverse z_impl_device_get_binding
To Reproduce Steps to reproduce the behavior:
- Enable console over uarte on nrf52810
Could you provide some more details regarding the configuration needed to reproduce the issue? The only board in the Zephyr source tree that currently uses the nRF52810 SoC is nrf52810_pca10040
and it has the console over UARTE enabled by default. For this board the console (in the hello_world sample, for instance) seems to be working fine.
Nothing special was set. I enabled
SERIAL
, UART_NRFX
, UART_0_NRF_UARTE
, UART_0_NRF_FLOW_CONTROL
and CONSOLE
, UART_CONSOLE
.
I tried again and it seems that the problem is caused by UART_0_NRF_FLOW_CONTROL
. That is, if the option is not enabled I application works, if it is enabled UART api is not specified and I get crash as described.
Seems API is set to NULL as uarte_0_init
fails and kernel/device.c
has a code that will set API to NULL in such a case (great idea btw Zepyr to set API to NULL instead of doing anything else that would point to the actual error).
I found the problem is in the dts file as instead of cts I have rts defined twice...
Describe the bug I tried to enable console via UARTE on nrf52810 but SOC crashes at early stage. Quick investigation revealed two things.
uart_console_init
does not check if get binding returned anything and so crash occurs much later when console is actually used.drivers/serial/uart_nrfx_uarte.c
).To Reproduce Steps to reproduce the behavior:
Expected behavior No crash, everything works
Impact Showstopper
Screenshots or console output
Environment (please complete the following information): master
Additional context N/A