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: Use with ZNP and uart.

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

Hello

I'm trying to talk to a CC2530 using the ZNP Stack and uart.
To do this, I flashed CC2530ZNP-with-SBL.hex from C:\Texas Instruments\Z-Stack 3.0.1\Projects\zstack\ZNP\CC253x\dev

I found two documents about ZNP usage.
Version 1.0 (02/2015): e2echina.ti.com/.../3731.Z_2D00_Stack-ZNP-Interface-Specification.pdf
version 1.1 (11/2016): from my ZStak 3.0.1 installation

Version 1.1 difference is (from document history) : "Update ZNP usage and definitions to Z3.0 stack. Removed support for SPI."

I wired it as stated in 2.2.1.1.4 (page 13) of the second document. CTS is grounded. CFG0 to gnd. CFG1 usage is not discussed in this doc but I connected it to ground too (based on the other 1.0 document)

I apply a low level on reset for one second and... nothing happens. I should receive SYS_RESET_IND

So my questions are :
- Did I flash the right hex file?
- Did I use the right array for wiring ( 2.2.1.1.4 )?
- what about CFG1 which is still described as an input in the documentation?
- Anything else I could have forgoten?

Thanks
Julien

  • What CC2530 HW do you use? CC2530DK or your custom board?
  • Hello Julien,

    1. You flashed the correct file, which programmer did you use and did you receive notification that the operation was successful?
    2. "ZNP Kit" could be referring to the CC2530ZDK-ZNP-MINI, you might want to use the main pin configuration instead. Please state your hardware as suggested by YK.
    3. You really only need to be concerned about CT/RT/TX/RX, RESET, and CFG0.  CFG1 can be grounded.
    4. You could always debug the CC2530ZNP-with-SBL project in IAR, I would also recommend monitoring your communication lines with an oscilloscope or logic analyzer. What is your host processor baud rate set to?

    Regards,
    Ryan

  • Hello Ryan,

    1. CC Debugger. Yes operation successfull.
    2. I will do it.
    3. OK
    4. 115200 8n1.

    Julien
  • Hello

    I'm still unable to get the answer to reset. 

    I thought it may be the module.  I checked that pins on the pcb were correctly labeled vs pins of the CC2530.

    I thought il may be the uart module of the CC2530. I built a small app that output some bytes. It worked.

    I tried to issue some reset messages through the CC2530 uart  (FE 01 41 00 00 40) . It's not more successfull. No answer.

    This morning, I switched to a CC2530EM module and the result is strictly the same. 

    It should be something obvious...

    wiring :

    CC2530    /    Microcontroler

    VCC  --  VCC

    GND   -- GND

    CFG0  -- GND  ( but tried with VCC with the same result)

    RESET <- GPIO

    CT  --- GND

    1_6      ->    RX

    1_7      <-    TX

    As CT is grounded, I left RT floating. Should I read it and manage CT to be 1 or 0 depending on RT and microcontroler status

    or can I left CT grounded all the time?

    I did the following screenshot without connection RX and TX:

    - orange is CC2530 RX (connecting to nothing else)

    - green is CC2530 TX (connecting to nothing else)

    - Yellow is reset

    After reset, I can't see anything happening...

    Thanks for your help

    Julien

  • I suppose you should do pull-high to both TX and RX pins.
  • Hi YiKai

    Thanks. Good idea.

    Here's the result with 330R. It's better in term of waveform but even when zooming, I can't see the module answer. :(

    Thanks

    Julien

  • What’s 330R?
  • 330R = pull up resistor 330 Ohm on both RX and TX lines. Sorry.
  • I suggest you to use 10K or 1K instead of 330R to test again.
  • Hey Julien,

    I looked into the default CC2530 ZNP project configuration and HAL_UART_DMA is defined with a value of 1 which uses P0.2/P0.3 for Rx/Tx, and this is confirmed through the CC2530EMK schematics. I apologize for the confusion but you will need to change pins accordingly. Do you have a SMARTRF05EB that you can use to evaluate the CC2530EM with Z-Tool on a host PC?

    Regards,
    Ryan

  • Hey Ryan,

    OK, I will try.
    No I don't have th SMARTRF05EB.


    Thanks again.
    Julien
  • And what about other pins ? As 1.2 and 1.3 does not correspond to any uart pin in ZNP doc,
    I can not infer the others.

    I tried all pins and I don't get any answer from the module but maybe that's because of CT and CT0 that may
    be elsewhere ? (in main pin configuration, 1.2 et cfg0 which is now uart).

    Julien
  • Typo, 0.2/0.3 (use the alternate configuration)

    Regards,
    Ryan
  • Using ZStack 3.0.1.

    Ok, I finally managed it to work by debugging the app through IAR.

    Conclusions are:

    - must use "alternate configuration" from the doc.

    - The provided source does handle both SPI and UART ( Or at least uses P2_0 to select the SPI or UART, maybe SPI is not working

    even with P2_0 correctly configured. I did not try). So, to use it with uart, I did the following:

    @@ -148,7 +148,7 @@
         znpCfg1 = ZNP_CFG1_SPI;
         znpCfg0 = ZNP_CFG0_32K_OSC;
     #else
    -    znpCfg1 = P2_0;
    +    znpCfg1 = 0;
         znpCfg0 = P1_2;
         // Tri-state the 2 CFG inputs after being read (see hal_board_cfg_xxx.h for CFG0.)
         P1INP |= BV(2);
    

    (basically ignoring P2_0 and force configuration to UART).

    Julien