Hello Nordic Experts,
In my nRF9160 application, I try to use gnss library based on the gnss sample, but k_malloc failed and I got
"Failed to allocate memory for NMEA"
from the gnss_event_handler
static void gnss_event_handler(int event)
{
int retval;
struct nrf_modem_gnss_nmea_data_frame *nmea_data;
switch (event) {
case NRF_MODEM_GNSS_EVT_NMEA:
nmea_data = k_malloc(sizeof(struct nrf_modem_gnss_nmea_data_frame));
if (nmea_data == NULL) {
LOG_ERR("Failed to allocate memory for NMEA");
break;
}
Do you have any idea?? I try to run my application in Power Saving Mode(PSM). Can I k_alloc in PSM mode ?
Regards,
JC