Hello sir,
I have a question.
Environment ===============
- JN-AN-1189-Zigbee-Ha-Demo code
- test code : Common_Light with DimmableLightOpenHome
Using : DriverBulb_DR1175.c
=========================
In above environment, I want to change the LED port for indication.
But I can not find how to change it
And I want to see the DR1175 board set code, which file do I check it?
I hope you give some advise.
Another quesiton.
================================================
- C:\NXP\bstudio_nxp\sdk\JN-SW-4168\Platform\DK4
DK4 folder has Build,Include,Library folder.
If I changed the include file, how to build it and how to adjust it?
=================================================
I need your help.
Thanks.
Hi Choi,
And I want to see the DR1175 board set code, which file do I check it?
I'm sorry, could you please look at the "C:\NXP\bstudio_nxp\sdk\JN-SW-4170\Platform\DK4\Source\LightingBoard.c".
Some LEDs are configured as Output pin and PWM.
If I changed the include file, how to build it and how to adjust it?
Did you change the location? You could add your h file in the project.
Regards,
Mario
Hi Mario.
I used JN-SW-4168, it does not have Source directory.
Do I need to update or used another SDK?
Regards,
Choi
Hi Choi,
I'm sorry, you could try the JN-AN-1218 Light Bulb example and the Zigbee 3.0 Stack JN-SW-4170.
Sorry for any inconvenience.
Regards,
Mario
Hi Mario,
Can you give me another way to use driverbulb?
==============================
And I will try below procedure.
- Use JN-SW-4168
- example code : Common light with DimmableLightOpenHome
- make new DriverBulb(change Dio port for my board)
- compile and use it?
- if you have any document for making new driverbulb, give me the link.
=============================
Regards,
Choi
Hi,
The example is setting the PWM in that DIO.
Please see how the example implementation, you could use for your own driver.
PUBLIC bool_t bWhite_LED_Enable(void)
{
/* Configure timer 0 to generate a PWM output on its output pin */
vAHI_TimerEnable(WHITE_LED_TIMER, WHITE_LED_TIMER_PRESCALE, FALSE, FALSE, TRUE);
vAHI_TimerConfigureOutputs(WHITE_LED_TIMER, FALSE, TRUE);
vAHI_TimerClockSelect(WHITE_LED_TIMER, FALSE, TRUE);
return TRUE;
}
PUBLIC bool_t bWhite_LED_On(void)
{
vAHI_TimerStartRepeat(WHITE_LED_TIMER, gu16PwmLastValue , PWM_COUNT );
return TRUE;
}
Hope it helps.
Regards,
Mario
Hi Mario,
Your answer is very useful for me. Thank you.
And I have another quesiton.
1. Do you have a example code for GPIO/ADC/I2C/EEPROM and so on ?
It is not easy to make code to see API. Because API just explain function prototype.
If you have the example code, I think it will help a lot.
Best regards,
Choi
Hi Choi,
Please look at the next applications notes that implement some examples.
JN-AN-1218 - Implements DIO and PWM.
Implements EEPROM, app_scenes.c PDM_eSaveRecordData
JN-AN-1220 - Implements the ADC
The I2C depends on your application.
vAHI_SiMasterConfigure(FALSE, // bPulseSuppressionEnable
FALSE,
31); Operating frequency = 16/[(PreScaler + 1) x 5] MHz
vAHI_SiMasterWriteSlaveAddr(0x69, 0/*E_AHI_SI_SLAVE_RW_SET*/);
if(bAHI_SiMasterSetCmdReg(E_AHI_SI_START_BIT,
E_AHI_SI_NO_STOP_BIT,
E_AHI_SI_NO_SLAVE_READ,
E_AHI_SI_SLAVE_WRITE,
E_AHI_SI_SEND_ACK,
E_AHI_SI_NO_IRQ_ACK))
{
//TO DO
}
For a better reference please look at the JN516x Integrated Peripherals API User Guide
Regards,
Mario
Hi,
Thank you for your reply. It is very useful.
I have another question.
- example code
1. ZigBee CPU : JN5169
2. Use JN-SW-4168, JN-AN-1189-HA-DEMO
3. Enddevice : DimmableLightOpenHome
Coordinator : Coordinator
In above condtion, I check the network connection but I can not understand how to opertion.
Can you explain the above example[how to operation]??
=====================================================
- coordinator side log :
[COOR]APP: vCheckStackEvent: vCheckStackEvent: ZPS_EVENT_NEW_NODE_HAS_JOINED, Nw
k Addr=0x3ab4
APP: No event to process
[COOR]sStackEvent.eType = 1
[COOR]APP: vCheckStackEvent: ZPS_EVENT_AF_DATA_INDICATION
Profile : 0
Cluster :13
EndPoint:0
APP: No event to process
[COOR]sStackEvent.eType = 14
[COOR]APP: vCheckStackEvent: ZPS_EVENT_ROUTE_DISCOVERY_CFM
APP: No event to process
[COOR]sStackEvent.eType = 0
[COOR]sStackEvent.eType = 0
[COOR]sStackEvent.eType = 0
=====================================================
- enddevice side log :
Entering cbZCL_EndpointCallback
[task] 0x1d
[task] EP EVT: Invalid evt type 0x1d
Entering cbZCL_EndpointCallback
[task] 0x1d
[task] EP EVT: Invalid evt type 0x1d
[node]POR Identify
[node] Stack Event
[zbp_uti] APP_ZPR_Light_Task event:20
[zbp_uti]Unhandled Stack Event
[node] E_RUNNING
[node]POR Identify
[node] Stack Event
[zbp_uti] APP_ZPR_Light_Task event:20
[zbp_uti]Unhandled Stack Event
[node] E_RUNNING
=====================================================
Best regards,
Choi
Hi Choi,
Could you please look at the JenOs that is implemented in the SDK that you are working on?
https://www.nxp.com/docs/en/user-guide/JN-UG-3075.pdf
Regards,
Mario