This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2530: ZNP - Not responding to commands through UART

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK, CC2531EMK

Hello,

My goal is to create secure mesh network of 100+ sensor nodes using CC2530 purely for serial communication (ZNP), the application will be running on Atmega328 (one for each node) so 8051 MCU will not be used at all. First I was using Xbee S2 for this project using Zigbee protocol and it was really straightforward to use but at the expense of way higher cost, so I have switched to CC2530 and I want to replicate what I was doing with Xbees S2.

My arduino and CC2530 should be interfacing using UART communication with  disabled flow cotrol since flow control with Atmega328 seems to be a bit more advanced issue and I want to remove as much variables as possible (at least for now) since I am not able to make this work at all so far. I have disabled the flow control in znp_app.c as shown on the picture: 

1) I have installed Z-stack 3.0.1 and IAR Workbench 8051 10.10.1 (30 day evaluation license) on my Windows PC

2) In IAR Workbench I have opened C:\Texas Instruments\Z-Stack 3.0.1\Projects\zstack\ZNP\CC253x\znp.eww

3) In IAR Workbench I have selected CC2530 board and ZNP with SBL:


4) I have set following compile options:

BDB_FINDING_BINDING_CAPABILITY_ENABLED=0
TC_LINKKEY_JOIN
NWK_MAX_DEVICE_LIST=10
ZDSECMGR_TC_DEVICE_MAX=30
DISABLE_GREENPOWER_BASIC_PROXY
POWER_SAVING
FEATURE_SYSTEM_STATS
MT_GP_CB_FUNC
MT_SYS_FUNC
MT_UTIL_FUNC
MT_ZDO_FUNC
ASSERT_RESET
FAKE_CRC_SHDW
ZNP_ENABLED
HAL_SPI=FALSE
HAL_UART=TRUE
NV_RESTORE
ZTOOL_P1

5) I have changed the output file to be in .hex format -> Rebuild All ->  IAR successfully compiles the file CC2530.hex 

6) I open SmartRF Flash Programmer and successfully upload the CC2530.hex file (I am also able to read IEEE address through the RF Flash Programmer)



7) I connect pin P_20 (CFG1) to the ground in order to specify UART as preferred way communication. (When I don't do that, the two messages I describe in step 8b are not received)

8) I open RealTerm (terminal program), select correct COM port, baudrate 115200 (tried also other rates), data size 8, 1 stop bit, no flow control.

a) When I open the COM port and send SYS_RESET_REQ to test the interface, nothing happens.

b) When I reset the CC2530 board I receive two identical messages with cca 2 seconds gap between them but the characters seem to be unreadable in Ascii. When I set display as "Hex", the message is as follows "FE064180010200020701C", then the message is received again in cca 2 seconds, the message is still the same.





I have also connected Atmega328(Arduino board) to the PC through USB, programmed it to read rx pin with 115200 baud rate, connected the CC2530 board to the Arduino with RX/TX + power and displayed the communication between Arduino and CC2530 through Serial monitor. After manual reset of the CC2530 board, Arduino also receives two unreadable messages.

I would like to ask someone for opinions what might be wrong.

I have also tried to setup Ztool (not sure if that is really needed since I should be able to configure the CC2530 just through the terminal as far as I understand) but Ztool does not recognize my device even though I have ZTOOL_P1 (or ZTOOL_P2) in my compilation options, correctly setup COM port, baud rate, no flow control etc. in the Ztool serial settings.

What I am essentialy trying to do is:

Arduino reads a sensor and decides to send a message to a certain node in the network, arduino configures the destination address on CC2530 and sends a message which is then received by the destination node and that distant arduino reads the received value and operates with it. Just this.


Also I do not have any of development kits etc. just TI CC Debugger and Zigbee USB explorer board with DEBUG pinout for CC Debugger.


Thank you very much for any help, I am trying to grind trough this for several days but without success.