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 mini (ports control)

Other Parts Discussed in Thread: CC2530, CC-DEBUGGER

Hello everybody,

As a very amature on 8051 modules my first goal is as simple as to control the ports of cc2530znp mini. To be specific I want to use the debug pins P0_2 or P0_3 of znp as outputs in order to light up a simple led on the breadboard. Reading from http://processors.wiki.ti.com/index.php/Changing_the_CC2530ZNP_Firmware I came to realize that this may not be possible if I do not “undo” the hardwired relationship of MSP430 and CC2530.

Thus following the above instructions I used IAR for msp430 to download the “HAL Utilities” workspace (done successfully) in order to configure the interface signals (MRDY, SRDY, MOSI, MISO, SCLK, CS, RESET) as inputs to msp430. From that point and without downloading the image CC2530-MK-Pro.hex (because I believe it is irrelevant to my simple task of lighting up a Led) I expected that I would have control on the debug pins (at least). So I used IAR for 8051 (30-day evaluation) and downloaded the following “dum” code via cc-debugger

#include "ioCC2530.h"

int main( void )

{

     P0DIR=0x12;

     P0|=0x12;

     while(1);

}

Watching the I/O register window on debug mode I see that I can control the P0DIR register correctly (from reset 0x00 it becomes 0x12) but the P0 register stays stuck on 0xFF. Do you have any idea why this happens or how I can gain control over the pins. Thank you


  • Just to make sure: Did you set up your project to use the debugger and not the simulator? I've done the same mistake a few times: Seemingly, the code is downloaded to the target, but it's just running on the simulator.

    Once that is done, I assume you have written some code on the MSP430 to take whatever you have on the pins P3.1 and P3.2 (which are connected to CC2530 P0.2 and P0.3) to set the two LEDs on pins P1.0 and P1.1 (on the MSP430)? At least if you're using the CC2530ZNP target board from the kit. 

  • Thank you for your immediate response.

    I am sorry, maybe I wasn' t clear enough on my previous post. First of all you are right to mention the simulator mode but this is not my problem (although I have done this mistake in the past). Previously when I mentioned pins P0_2 and P0_3 I was referring to CC2530. Those pins (of cc2530) are accessible on the znp mini from two of the 10 pins on which cc-debugger is connected. My final aim is to control cc2530 alone, separately from msp430 in order to decide weather or not I could use cc2530 as an application processor also other than zstack carrier.That's why I am trying to get those pins set to high in order to simply light an external led in another breadboard.So with the process I mentioned before (link in previous post), I was hoping to "get rid" of any msp430 interference (make all its pins inputs) so that I get full access on cc2530 pins. By the way when I switch to simulation mode the pins take the proper value as seen below  

    But when I switch from Simulation to Texas Instruments (to use cc-debugger) I get no response on the port 0 (whereas register P0DIR seems is responding).

    By the way the code used for these results is

    #include "ioCC2530.h"

    int main( void )
    {
          P0DIR=0x0C;
          P0=0x0C;
          while(1);
    }