Hello.
I am trying to use FreeRTOS and have run into a problem. If I call logging in the FreeRTOS software timer handler, the program stops.
Here is a simple example:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "nrf_drv_common.h"
#include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"
#include "FreeRTOS.h"
#include "timers.h"
#include "task.h"
volatile TimerHandle_t xOneSec_Timer;
void blink_task(void *p){
while(1){
NRF_LOG_INFO("Blink");
vTaskDelay(1000);
}
};
The output to the Ozone terminal looks like this: I see a "Start" message, messages with a counter, but as soon as the timer handler is called, the program stops. If in the timer handler you do not call a log entry, but for example blink the LED, then everything works. I see messages from the blink task and blinking LED.
What am I doing wrong?