Dali Slave LPC1114 does not react on broadcast commands

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dali Slave LPC1114 does not react on broadcast commands

Jump to solution
1,194 Views
jenson
Contributor II

Hello together,

I made a design for a Dali slave like described in AN11174. Behause I'm not using an external oscillator I set the Variable "MAIN_CLKSRCSEL_Val" in the file "system_LPC11xx.c" to "0x00000000" for using the internal RC oscillator. After flashing the software and after reset the heartbeat led is blinking in a 1s interval - so far so good. As Dali Master which works well with other Dali devices (slaves) I use a Siemens Dali KNX Gateway. When the Dali Master sends out a search broadcast the signal at the dali in pin of the microcontroller looks fine (oscilloscope). But I don't get out a response at the dali out pin. Furthermore the heartbeat led continues blinking in 1s interval without blinking randomly inbetween. I tried to debug the issue, but I don't find the Dali command handler in the source files. The first step I would do is having a look in the command handler and find out, why the broadcast commands doesn't lead to some action. Does anybody know how I could get a deeper look inside the command handler? What could I else do, to get my slave responding?
Best regards!
0 Kudos
1 Solution
754 Views
jenson
Contributor II

Hello everybody,

in this thread Gintaras gave me the hint, that my problem has something to do with the Version of the µC. Since I have observed the problem with the LPC1114FBD48/303 (XL-version), I ordered some other versions:

LPC1114FBD48/301

LPC1114FBD48/302

LPC1114FBD48/302,1 (cheapest)

I began with the cheapest version and the problem could be solved with this µC. Thanks Gintaras!

I noticed some other issues for which I will create a new thread. For people who want also build a Dali Slave based on the NXP Application Notes I link from here to the other thread.

View solution in original post

0 Kudos
3 Replies
755 Views
jenson
Contributor II

Hello everybody,

in this thread Gintaras gave me the hint, that my problem has something to do with the Version of the µC. Since I have observed the problem with the LPC1114FBD48/303 (XL-version), I ordered some other versions:

LPC1114FBD48/301

LPC1114FBD48/302

LPC1114FBD48/302,1 (cheapest)

I began with the cheapest version and the problem could be solved with this µC. Thanks Gintaras!

I noticed some other issues for which I will create a new thread. For people who want also build a Dali Slave based on the NXP Application Notes I link from here to the other thread.

0 Kudos
754 Views
jenson
Contributor II

Hello everybody,

now I have got holiday and finally enough time to have a deeper view into this topic. I already checked, if the DALI_Decode function works correctly. And yes, it does: The rawData value is translated correctly into the forward frame. To get a deeper view into the search procedure of my Dali master I stored all the forward frames into one address and one command array while having a look on the in and outgoing signals at the µCs Dali input and output pins with an oscilloscope. The search procedure makes sense for me and works fine for another Dali slave. However for the LPC1114 Dali Slave it does not. The search procedure bitwise increases every of the three search bytes to 0xFF without getting a response to the compare command (which is sent out after each increase) of the LPC1114 Dali slave.

This behavior is not surprising since the software code does not go into the DALI_SendBackwardFrame(uint8_t backward_frame) procedure. I checked this by adding a simple breakpoint in the first statement of the procedure before starting the search procedure of Dali master once again.

I examined all the things today but now I'm stuck. I would be very pleased to get some help or the right hints.

Best regards!

Jens

0 Kudos
754 Views
isaacavila
NXP Employee
NXP Employee

Hello Jens,

DALI lib (which source code is not available in this project) handles the reception and transmission of DALI frames using the CT32B0 timer/capture unit. You can check then void TIMER32_0_IRQHandler(void) ISR and check how this frame is obtained.

Basically, you will see that received frame is stored on FFrame variable and FFrameReceived flag indicates when a complete DALI frame is received:

        //we now can decode the received DALI frame, initiate action outside of ISR
        //by writing to the queue
        if (BitPositionRx == FORWARD_FRAME_BIT_LENGTH)
        {
            FFrameReceived = true;
        }‍‍‍‍‍‍

And, once this frame is received, it is decoded on DALI_Decode function inside the DALI_ReadForwardFrame function:

      /* any forward frame received? */
        if (FFrameReceived)
        {
            uint32_t rawData = FFrame;
            FFrameReceived = false;
            if (DALI_Decode(rawData, pForwardFrame))
            {
                // Forward Frame did not have encoding violations
                return true;
            }
        }‍‍‍‍‍‍‍‍‍‍‍

You can check what value is decoded (what value rawData has) and validate that DALI_Decode function can decode this value correctly.

I hope this helps!

Regards,

Isaac

0 Kudos