This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART and Timer issue with light switch client example (mesh 3.0)

Hi,

I implemented my application top of the mess 3.0, mesh is working fine able to hop the messages to the gateway via relays(nodes)

Issue with UART:-

here nrf52840 is communicating with network communication module using UART

and this is UART initialization

uint32_t err_code;

const app_uart_comm_params_t comm_params =
{
UART_RX_PIN,
UART_TX_PIN,
UART_CTS_PIN,
UART_RTS_PIN,
UART_HWFC,
false,
NRF_UART_BAUDRATE_115200
};

APP_UART_FIFO_INIT(&comm_params, UART_RX_BUF_SIZE, UART_TX_BUF_SIZE,
UART_Callback, APP_IRQ_PRIORITY_HIGHEST, err_code);

APP_ERROR_CHECK(err_code);

basically I am sending AT commands and getting the responses from Network module, it is working fine if i disable mesh but main problem is when i run mesh as well as my application UART strucking  while receiving the data(response) from network module(strucking in receiving the bytes)

i changed IRQ priority of the UART from low to highest but issue is same

Issue with Timer:-

Here I am trying to send Beacons information to the Network module(to cloud) with required send interval, for the i used TIMER1

Here is the Timer initialization

ret_code_t err_code;
uint32_t time_ticks;

nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
timer_cfg1.frequency = NRF_TIMER_FREQ_62500Hz;
timer_cfg1.bit_width = NRF_TIMER_BIT_WIDTH_32;
uint32_t time_ms = SEND_TIME_OUT;

NBIoT_Timer_Init();
err_code = nrf_drv_timer_init(&TIMER1, &timer_cfg, timer_event_handler);
APP_ERROR_CHECK(err_code);

time_ticks = nrf_drv_timer_ms_to_ticks(&TIMER1, time_ms);

nrf_drv_timer_extended_compare(&TIMER1, NRF_TIMER_CC_CHANNEL0, time_ticks, NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, true);

after some time the timer interval is automatically moving to 40 sec or 1 minute.

please help me on this issue.

thanks and regards,

Swamy.

Parents
  • Hi Swamy, 

    Please provide more debug information in each case. What exactly you meant by "strucking in receiving the bytes" ? Do you see the UART interrupt handler called when you receive a byte? 

    Please make sure you followed the requirement regarding the interrupt priority here

    We have an example of using Mesh and UART in \examples\sdk_coexist could you have a look ? 

Reply
  • Hi Swamy, 

    Please provide more debug information in each case. What exactly you meant by "strucking in receiving the bytes" ? Do you see the UART interrupt handler called when you receive a byte? 

    Please make sure you followed the requirement regarding the interrupt priority here

    We have an example of using Mesh and UART in \examples\sdk_coexist could you have a look ? 

Children
No Data
Related