Hi,
I was wondering if there is any working example that uses ble_app_uart example with libuarte.
Thanks
Hi,
I was wondering if there is any working example that uses ble_app_uart example with libuarte.
Thanks
Hi.
As of now, there are no existing examples that do what you ask. However, there is a libuarte example. If you want to use libuarte in ble_app_uart, I would recommend starting with the ble_app_uart example and add the libuarte library to this, and to look at how the library is used in the libuarte example.
Best regards,
Marte
First of all thanks for the answer.
I managed to get libuarte example to work as expected. The problem is that I can't merge it to the ble_app_uart example.
Here is one of the problems I am currently getting. I tried to add nrfx_timer.c file to the project because it is necessary for the library. Now the problem is that it is all grayed out because it doesn't "sees" the defines from sdk_config.h. I enabled everything like in the libuarte example and still can't get it to work. The strange thing is that drivers like nrfx_clock.c work perfectly fine. I found out that any new drivers that were not part of the original example have the same problem.
To fix this I tried of the things that was suggested in the forum which is to disable #include <legacy/apply_old_config.h> on line 57 of nrfx_glue.h file. That fixed the problem of includes but now I get NRF_ERROR_NO_MEM in random function like uint32_t err_code = bsp_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS, bsp_event_handler);
I narrowed it down to where the problem is and turns out that function "channel_port_alloc" return error on the second time it needs to allocate the pin. Please have in mind that the function works perfectly fine as long as "apply_old_config.h" is included which is very strange.
I really tried everything to make this work but these kinds of errors are extremely difficult to debug. I would appreciate some help or guidance with this because it is really blocking our development with this chip.
Here you see that every define is enabled and the driver is still not working as long as the apply_old_config.h is included.
Did you include the path of nrfx_timer.h (and any other include file you added) in User Include Directories in SES? To add it go to Project > Options and Preprocessor > User Include Directories and add the path there.
You can also try to take a look at this guide on how to merge two nRF5 SDK examples in SES.
Best regards,
Marte
Yes, I did the following. I added all preprocessor paths from libuarte example that are not present in ble_app_uart. That part is fine and I verified by making sure that the IDE sees headers like #include "nrf_libuarte_async.h" which were not originally present in the example.
So that part should be correct. Also, nrfx_timer.c is in the same folder as the other nrfx drivers so logically if nrfx_clock.c works I expect nrfx_timer.c to behave the same. As I said the main problem is with sdk_config.h. It seems that nrfx_timer.c don't see defines even tho it includes <nrfx.h> that includes <nrfx_config.h> that includes "sdk_config.h". So definitely that driver should have access to the defines but it doesn't. Also, I verified that the nrfx_clock.c uses sdk_config.h because when I disable the necessary include the code is all grayed out as it should be.
I tested also with drivers such as nrfx_spis.c and the problem is the same so I assume it has nothing to do with nrfx_timer.c specifically than with the fact that that driver was not part of the original example if that makes sense.
By the way, the fact that commenting apply_old_config.h even tho it is completely grayed out because non of defines is true causes functions to fail is kinda unsettling.
Thanks,
Aleksa