JN5169 Cannot handle uart data

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

JN5169 Cannot handle uart data

1,588 次查看
pierrelgcb
Contributor III

JN5169

JN-AN-1217-Zigbee-3-0-Base-Device

Coordinator = DR1174 + DR1199 ,    End Device = JN5169-001-M00-2

Hello,

Running Coordinator demo works fine. It prints logs on terminal (UART0) and I can send commands (print, form, steer...).

Running End Device demo works fine. It prints logs on terminal (UART0). Sending commands only with buttons.

I would like to send commands to End Device with serial (UART0). I merged Coordinator UART code but End Device never handle serial data interrupts.

APP_isrUart is never called. I tried to change power mode in app.zpscfg to force awake power mode. It fails.

In function ZQ_bQueueReceive , if( psQueueHandle->u32MessageWaiting >  0) is always false.

PUBLIC bool_t ZQ_bQueueReceive ( void*    pvQueueHandle, void*    pvItemFromQueue )
{
    uint32 u32Store;
    tszQueue *psQueueHandle = (tszQueue *)pvQueueHandle;
    bool bReturn = FALSE;
    MICRO_DISABLE_AND_SAVE_INTERRUPTS(u32Store);
    if( psQueueHandle->u32MessageWaiting >  0)
    {
        if( psQueueHandle->pvReadFrom >= (psQueueHandle->pvHead+(psQueueHandle->u32Length*psQueueHandle->u32ItemSize) ))
        {
            psQueueHandle->pvReadFrom = psQueueHandle->pvHead;
        }
        ( void ) memcpy( pvItemFromQueue, psQueueHandle->pvReadFrom, psQueueHandle->u32ItemSize );
        psQueueHandle->pvReadFrom += psQueueHandle->u32ItemSize;
        psQueueHandle->u32MessageWaiting--;
        
        /* Decrease power manager activity count */
        PWRM_eFinishActivity();
        bReturn = TRUE;        
    }
    else
    {
        bReturn =  FALSE;
    }
    MICRO_RESTORE_INTERRUPTS(u32Store);
    return bReturn;
}

I can flash the End Device via UART0, it's not hardware issue.

I would appreciate some advices.

Thanks, Pierre

标签 (2)
标记 (2)
3 回复数

1,270 次查看
pierrelgcb
Contributor III

OK, I forgot to update irq_JN516x.S file. I can now send command to End Device with UART0.

0 项奖励
回复

1,270 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Pierre,

Just to confirm, are you able to send data over the UART successfully?

Regardsm

Mario

0 项奖励
回复

1,270 次查看
pierrelgcb
Contributor III

Hi Mario,

Yes I am.

Regards,

Pierre