free rtos log suspend 17.1

Dear Engineer,

Working on sdk17.1, hrs free rtos demo. chip nrf52832, on pca10040 board.

From Sdk 17.1, log not resume in application hook to save power.

Use log_pending_hook to wakeup log thread.

The problem is only print one time log when power on,

once log suspend, will never wakeup again.

You can use demo, then connect it, will find no log when connected.

Please help check.

Thanks

Best Regards

Robert

Parents
  • Hi, the following patch will fix the problem. Please replace the following function in main.c, with the code below:

    #if NRF_LOG_ENABLED && NRF_LOG_DEFERRED
    void log_pending_hook( void )
    {
        BaseType_t YieldRequired = pdFAIL;
        if ( __get_IPSR() != 0 )
        {
            YieldRequired = xTaskResumeFromISR( m_logger_thread );
            portYIELD_FROM_ISR( YieldRequired );
        }
        else
        {
            UNUSED_RETURN_VALUE(vTaskResume(m_logger_thread));
        }
    }
    #endif

    Best regards,
    Stian

Reply
  • Hi, the following patch will fix the problem. Please replace the following function in main.c, with the code below:

    #if NRF_LOG_ENABLED && NRF_LOG_DEFERRED
    void log_pending_hook( void )
    {
        BaseType_t YieldRequired = pdFAIL;
        if ( __get_IPSR() != 0 )
        {
            YieldRequired = xTaskResumeFromISR( m_logger_thread );
            portYIELD_FROM_ISR( YieldRequired );
        }
        else
        {
            UNUSED_RETURN_VALUE(vTaskResume(m_logger_thread));
        }
    }
    #endif

    Best regards,
    Stian

Children
No Data
Related