octopus n 開發 教學
DESCRIPTION
Octopus N 開發 教學. Joshua Hsu 許朝翔. Outline. Zigbee 簡介 環境 介紹及軟體安裝 Octopus X/N 燒錄流程 基本開發程式 架構 重要函式 介紹 基礎程式範例介紹. High Speed Communication and Computing Laboratory. Zigbee 簡介. Zigbee 簡介. ZigBee 技術 是以 IEEE 802.15.4 為基礎,在各種物品上置入一個低耗電及低成本 的 ZigBee 無線 模組來達到存取資訊以及進行控制的技術。. - PowerPoint PPT PresentationTRANSCRIPT
Octopus N
Octopus N Joshua Hsu
Zigbee Octopus X/N Outline
High Speed Communication and Computing LaboratoryZigbee
ZigBee IEEE 802.15.4 ZigBee
Zigbee
High Speed Communication and Computing Laboratory
IEEE 802.15.4Wireless MAC and PHY Specification for Low-Rate Wireless Personal Area Networks (LR-WPANs)
Full Function Node (FFD)IEEE 802.15.4Reduced Function Node (RFD)IEEE 802.15.4
Zigbee
High Speed Communication and Computing Laboratory
Zigbee
High Speed Communication and Computing Laboratory
PAN Coordinator (FFD) Zigbee PAN ID, Security, Channel Network Router (FFD)End Device (RFD) Topology PHY MAC Zigbee
High Speed Communication and Computing Laboratory
Star TopologyMesh TopologyPAN Coordinator
Zigbee 802.15.4NWKAPL
Zigbee
High Speed Communication and Computing Laboratory
Octopus N / X
Zigbee
High Speed Communication and Computing LaboratoryOctopus XOctopus NCPU(MCU)CC2430CC2530PCB onlyPCB / SMA8KB RAM128KB Flash8KB RAM256KB FlashA,CA,B,D(A)3(C)3()UserFlashMicroSDSMACC2591(D)USART(*2)ADC21 general I/O pinsGPSCO2 ..
IAR Embedded Workbench (EW8051 -730B) (OctopusX)IAR Embedded Workbench (EW8051 -760B) (OctopusN)SmartRF Flash Programmer Z-stack 1.4.3-1.2.1(TI)Octopus X/N
Octopus X/N Octopus X/N Debugger Board
High Speed Communication and Computing Laboratory
High Speed Communication and Computing Laboratory
For Octopus XFor Octopus NOctopus X/N
High Speed Communication and Computing Laboratory
Octopus XDongle
Octopus NIAR Embedded WorkBenchIAR Embedded Workbench(EW8051)8051
Z-stackZ-Stack TIZigBee
SmartRF Flash ProgrammerTI Flash IEEE /SmartRF 04EB
High Speed Communication and Computing LaboratoryDebugger board SmartRF Flash ProgrammerPC
Windows 7 Windows Updater
High Speed Communication and Computing LaboratorySmartRF Flash Programmer
Z-stack
Octopus N C:\Texas Instruments\ZStack-CC2530-2.3.1-1.4.0\Components Octopus X C:\Texas Instruments\ZStack-1.4.3-1.2.1\Components
High Speed Communication and Computing LaboratoryIAR HW1 SampleApp.eww()option
High Speed Communication and Computing Laboratory
IAR toolsf8w2530.xcl 210-211
High Speed Communication and Computing Laboratory
hexEraseprogram
High Speed Communication and Computing Laboratory
1.2.
High Speed Communication and Computing Laboratory
High Speed Communication and Computing Laboratory
ProjectName_Init() (ZDProfile.h)
ProjectName_ProcessEvent()tasktimermessages
ProjectName_HandleKeys()
High Speed Communication and Computing Laboratory SYS_EVENT_MSGZComDef.h
AF_DATA_CONFIRM_CMDAF_INCOMING_MSG_CMDKEY_CHANGEZDO_NEW_DSTADDRZDO_STATE_CHANGE
High Speed Communication and Computing LaboratoryAF_DATA_CONFIRM_CMD(request)Zsuccessdata request
AF_INCOMING_MSG_CMD
KEY_CHANGEdevice
High Speed Communication and Computing LaboratoryZDO_NEW_DSTADDRMatch Descriptor Request
ZDO_STATE_CHANGEEX: Router / End device
High Speed Communication and Computing Laboratory
LED HalLedSet (uint8 leds, uint8 mode)uint8 leds: HAL_LED_X/ X: 1(G), 2(R), 3(Y), 4(B), ALL()
uint8 mode:HAL_LED_MODE_BLINKHAL_LED_MODE_FLASHHAL_LED_MODE_TOGGLEHAL_LED_MODE_ONHAL_LED_MODE_OFF
High Speed Communication and Computing LaboratoryLED HalLedBlink( HAL_LED_ALL, 4, 50, 500 );HAL_LED_ALL : led4 : 450 : 50ms500 : 500ms
High Speed Communication and Computing LaboratoryUART Octopus N/X USB Port 0 UART (UART1GPS) UART compile option HAL_UART #include uart.cinitial function open(TaskID);HalUARTWrite() UARTUART portPC
uart.c
High Speed Communication and Computing LaboratoryTimerosal_start_timerEx( //timeout byte taskID,//ID UINT16 event_id, UINT16 timeout_value // );event_idIDProject_ProcessEvent
High Speed Communication and Computing LaboratoryTimerosal_set_event( // byte task_id, //ID UINT16 event_flag )
UINT16 event_flag:IDProject_ProcessEvent
High Speed Communication and Computing LaboratoryRF AF_DataRequest( afAddrType_t *dstAddr, // endPointDesc_t *srcEP, //End point uint16 cID, //ID uint16 len, // uint8 *buf, // uint8 *transID, uint8 options, //ACKRoute uint8 radius ) request
High Speed Communication and Computing LaboratoryHW1
Z-stack C
event driven Z-stack event sensor node
High Speed Communication and Computing Laboratory Z-stack IDE IARIAR
High Speed Communication and Computing Laboratory
High Speed Communication and Computing LaboratoryTexas InstrumentsZStack-CC2530-2.3.1-1.4.0ProjectsProjectNameSampleszstackCC2530DBComponentshalmacosal.........Source
High Speed Communication and Computing LaboratoryProjectNameSamplesCC2530DB.........SourceSampleApp.ewwCoordinatorEB/EndDeviceEB/RouterEBexehex ProjectName.c(Define flag) compile
HAL_UART compile include uart.c
Type D Type compile Type D Code OCTOPUSN_TYPED
High Speed Communication and Computing Laboratory
High Speed Communication and Computing Laboratory
OCTOPUSN_TYPED Octopus N Type D CC2591 LED Type /Components/hal/hal_board_cfg.h
High Speed Communication and Computing Laboratory
(ProjectName.c) includeInclude library Macro
High Speed Communication and Computing Laboratory include Library
High Speed Communication and Computing Laboratory
ClusterList
Description
code
High Speed Communication and Computing Laboratory
void SampleApp_HandleKeys ( uint8 shift, uint8 keys );void SampleApp_MessageMSGCB ( afIncomingMSGPacket_t *pckt );void SampleApp_SendPeriodicMessage( void );void SampleApp_SendFlashMessage ( uint8* data , uint8 length);
High Speed Communication and Computing Laboratoryvoid SampleApp_Init( uint8 task_id )
Initial function addMode (Addr16Bit)(AddrBroadcast)endPoint end point ()shortAddr(nodeID)0xFFFF0x0000 coodinator
High Speed Communication and Computing Laboratory
SampleApp_ProcessEvent
1
2
High Speed Communication and Computing Laboratory
48CoordinatorRouterEnd device
High Speed Communication and Computing Laboratory
49CoordinatorRouterEnd device
High Speed Communication and Computing Laboratory
501SAMPLEAPP_SEND_MSG_EVT
LEDFlash cluster5 TEST! Timer
High Speed Communication and Computing Laboratory
512SAMPLEAPP_SEND_UARTMSG_EVT
UART(flash cluster)UARTwriteUART buffer
High Speed Communication and Computing Laboratory
52SampleApp_MessageMSGCB Cluster
Period cluster
Flash cluster
High Speed Communication and Computing Laboratory
53 flash cluster
LEDUARTuart write
High Speed Communication and Computing Laboratory
54SampleApp_SendFlashMessage
AF_DataRequest
High Speed Communication and Computing Laboratory
55UARTbitRate38400
HalUARTWirte sensor
UART
High Speed Communication and Computing Laboratory
56Q &
High Speed Communication and Computing Laboratory