I used the coordinator to send data to the END node, which immediately stopped working (the entire node module stopped working).How do you solve this?

cancel
Showing results for 
Search instead for 
Did you mean: 

I used the coordinator to send data to the END node, which immediately stopped working (the entire node module stopped working).How do you solve this?

1,068 Views
jun951753jun951
Contributor III

I used the coordinator to send data to the terminal node, which immediately stopped working (the entire node module stopped working).How do you solve this?

  • The data displayed by the serial port is as follows:

  • What does all this mean?

  • Why is the node not working?

  • How to start over?

  • pastedImage_1.png
13 Replies

671 Views
jun951753jun951
Contributor III

Now I have a question, I have a node that doesn't need to sleep or Long wake-up time (1 hour), what do I do?
I think there are two related parts in the 1229 template.
1 PWRM_eScheduleActivity(&sWake, SLEEP_TIME, vWakeCallBack);
Change SLEEP_TIME(5 * 32000 ) to SLEEP_TIME(0 * 32000 )。Wake up the device after 0 seconds。
2 in ZTIMER_vWake(); in function vAHI_TickTimerInterval(16000); Change the parameters to make it larger
Can I use it like this?

0 Kudos

671 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

Also, please look at the ZPS_bAplAfSetEndDeviceTimeout

ZigBee 3.0 Stack User Guide

Regards,

Mario

0 Kudos

671 Views
jun951753jun951
Contributor III
  • Can you define your own timer at the SED node?  in 1229 

  • how to define?
0 Kudos

671 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

You could add the timer interrupt.

APP_vInitialiseSleepingEndDevice()
{
.
.
.
    /* Initialise other software modules
     * HERE
     */
    //Timer 0 init
    DBG_vPrintf(TRUE, "***TMR_vInit***********************\n");
    TMR_vInit();
.
.
}

PUBLIC void TMR_vInit(void)
{
    DBG_vPrintf(TRUE, "vAHI_DioSetDirection Start\r\n");
    vAHI_DioSetDirection(0, 0x10);

    /* Make sure no DIO claimed by timer */
    vAHI_TimerDIOControl(E_AHI_TIMER_0, FALSE);

    vAHI_TimerEnable(E_AHI_TIMER_0, 8, TRUE, TRUE, FALSE);

    vAHI_TimerStartRepeat(E_AHI_TIMER_0, 312,625);//312, 625 );

    vAHI_DioSetOutput(0x10,0);
}

PUBLIC void vISR_Timer0()
{
 static bool toggle = 0x01;
  (void) u8AHI_TimerFired(E_AHI_TIMER_0);
  if(toggle)
  {
   toggle = 0x00;
   vAHI_DioSetOutput(0,0x10);
  }
  else
  {
   toggle=0X01;
   vAHI_DioSetOutput(0x10,0);
  }

}

Also, you need to modify the irq_JN516x.S

   .byte 11                # timer0 priority
.
.
    .extern vISR_Timer0
.
.
.
    .word vISR_Timer0                       # 11

You will see the toggle pin. I tested by my side it works.

Let me know if you have any issues.

Regards,

Mario

671 Views
jun951753jun951
Contributor III

ok ,thank you very much

0 Kudos

671 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

The JN entered in a bus error. How are you sending the data?

Are you working on the JN-AN-1229?

Regards,

Mario

671 Views
jun951753jun951
Contributor III

working on the JN-AN-1229?

yes

0 Kudos

671 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

I was checking the code and you are missing the PDUM_u16APduInstanceWriteNBO. writes the specified data values into the specified APDU instance. 

Please look at the code below.

       // allocate memory for APDU buffer with preconfigured "type"
        PDUM_thAPduInstance data = PDUM_hAPduAllocateAPduInstance( apduMyData );
        if( data == PDUM_INVALID_HANDLE )
        {
            // problem allocating APDU instance memory
            DBG_vPrintf(TRACE_APP, "APP: Unable to allocate APDU memory\n");
        }
        else
        {
            // read ADC values
            int16 sensorValue = 0x5678;
            int16 batteryValue = 0x9ABC;
            int16 pwmvalue = 0xDEF0;

            // load payload data into APDU
            uint16 byteCount = PDUM_u16APduInstanceWriteNBO(
                    data,   // APDU instance handle
                    0,      // APDU position for data
                    "hhh",  // data format string
                    sensorValue,
                    batteryValue,
                    pwmvalue
            );
            if( byteCount == 0 )
            {
                // no data was written to the APDU instance
                DBG_vPrintf(TRACE_APP, "APP: No data written to APDU\n");
            }
            else
            {
                PDUM_teStatus pdumStatus = PDUM_eAPduInstanceSetPayloadSize( data, byteCount );

                if( pdumStatus != PDUM_E_OK )
                {
                    DBG_vPrintf(TRACE_APP, "SendData: SetPayloadSize error, Status = %d\n", pdumStatus);
                    PDUM_eAPduFreeAPduInstance( data );
                }
                else

Regards,

Mario

671 Views
jun951753jun951
Contributor III
  • I changed the function but the  bus error is still there

  • Only the terminal node will occur and this fault coordinator will not

pastedImage_1.png

0 Kudos

671 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

Just to confirm. The coordinator that you are using is JN-AN-1229. Right?

Is the end device getting the bus error?

The process that I am understanding is, you create a Zigbee Network, 1 Coordinator and 1 end device.

-The coordinator sends some data to the end device and after the end device receives this data, the bus error happen.

Could you please confirm this process?

Regards,

Mario

671 Views
jun951753jun951
Contributor III

I'm using 1229    

Is the end device getting the bus error?   yes

Could you please confirm this process? yes i can confirm.

 Bus Errors occur when a  end device  receives and sends data continuously, not once.
Sometimes  end device can send and receive data normally for a period of time (from tens of seconds to minutes)

0 Kudos

671 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

You do not have any problem sending data, the issue is after receive and send data the end device enters in a bus error. Is this correct?

The issue that you are facing is not how to send data.

Is the end device in sleep mode? What is the length of the data that you are sending?

Regards,

Mario

671 Views
jun951753jun951
Contributor III
  • Called in the timer handler function.

pastedImage_2.png

pastedImage_3.png

0 Kudos