Yes, I understand, but all the screenshots that help to understand the essence of the problem and my reasoning are not loaded onto the post. In addition, there is a message that this post should check the moderator. We are all people,
I understand that the moderator can not instantly view my post and make a decision, but since the information on DALI is VERY IMPORTANT, i have to move in other ways. I apologize for the links in the post.
At the moment I'm interested in working example of working with the DALI protocol.
Examples I could find on the XMC1200 for working with DALI, I did. But the master (NXP LPC134x) never found the lamp (XMC1200 Boot kit with White LED Card). The reason the master did not recognize the lamp (slave device), I do not understand!
Judging by the code:
Code:
void OneMsInter (void)
{
uint32_t bccu_fade_status;
/ * stop timer * /
status = SYSTM002_StopTimer (OneMsTmrId);
/ * Call Dali maineThread to maintain dali communication * /
DALICG02_MainThread (& DALICG02_Handle0);
/ * Restart timer * /
status = SYSTM002_StartTimer (OneMsTmrId);
/ * check if BCCU has completed dimming-only for HW-based dimming * /
bccu_fade_status = BCCUDIM01_FadeCompletionStatus (& BCCUDIM01_Handle0);
if (! bccu_fade_status)
{
if (DALICG02_Handle0.DALI102_Handle-> stStatus_info.bFade_running)
{
/ * reset DALI fade status flag * /
DALICG02_Handle0.DALI102_Handle-> stStatus_info.bFade_running = DALICG02_BIT_ZERO;
/ * update DALI actual level * /
DALICG02_Handle0.DALI102_Handle-> uiActual_arc_lvl = DALICG02_Handle0.DALI102_Handle-> uiReq_arc_pwr;
if (DALICG02_Handle0.DALI102_Handle-> uiActual_arc_lvl == 0U)
{
/ * reset Dali light on status flag if DALI actual level is 0 (off) * /
DALICG02_Handle0.DALI102_Handle-> stStatus_info.bLight_on = DALICG02_BIT_ZERO;
}
}
}
}
Code:
/ * create time base for 1ms interrupt to service Dali * /
OneMsTmrId = SYSTM002_CreateTimer (1000U, SYSTM002_PERIODIC, (void *) OneMsInter, NULL);
status = SYSTM002_StartTimer (OneMsTmrId);
the luminaire must enter every 1 ms into the interrupt and within the interrupt enter the function:
Code:
DALICG02_MainThread (& DALICG02_Handle0);
Where is written each of the possible commands.
Then my master must pass INITIALISE (0b1010010100000000) twice with an interval of no more than 100ms;
RANDOMISE (0b1010011100000000) with an interval of not more than 100ms;
request for received addresses: (0b10110001HHHHHHHH, 0b10110011MMMMMMMM, 0b10110101LLLLLLLL);
COMPARE (0b1010100100000000);
after determining the address of the luminaire, the controller sets the lighter a short address (0b10110111AAAAAAAA) and sends the WITHRAW command (0b1010101100000000), which excludes the luminaire from the search process;
After the initialization process is complete, the controller sends a TERMINATE command (0b1010000100000000), and the fixtures exit the initialization mode.
but in the end I get this:
Attachment 3158
I ask you to lay out an example of working with DALI. The most important thing that interests me is the initialization of the lamp.
I'm satisfied with the example written on the basis of DAVE 3. libraries, in DAVE 4 I did not find the finished DALI library.