QE128 and MC1320x RF Card

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QE128 and MC1320x RF Card

998 Views
Justin
Contributor I

Hi all,

 

Has anyone tried using a DEMOQE128 board with a MC1320x RF Card? I'm in the process of trying to use the RF card with the DEMOQE128 board and seem to be having a few issues getting it to initialize. Essentially what I did was copy the pin outs of the 1320xQE128EVB board to that of what I have on the DEMOQE128 board, such that every pin is connected exactly like the 1320xQE128EVBRM to the RF card. Using the BeeKit I generated test code for the 1320xQE128EVB and just switched CodeWarrior to compile correctly for my target, the DEMOQE128. Running the code "out of the box" without any modifications gets stuck in an infinite loop in the initialization process specifically at the function "void ICG_SetupQE128()" in the file "icg.c". It locks up in this snippet of code:

 

  do
  {
   /* Write Abel/Toro clock */
   MC1319xDrv_WriteSpiAsync(ABEL_regA, gHardwareParameters.Abel_Clock_Out_Setting);
  
   WAIT_FOR_STABLE_CLOCK
  
   /* Read Back Abel/Toro clock */
   MC1319xDrv_ReadSpiAsync(ABEL_regA, &reg);
  }while(reg != gHardwareParameters.Abel_Clock_Out_Setting);

 

 Of course, reg never equals Abel_Clock_Out_Setting and is stuck in a loop. I can only assume the problem is that the SPI is not working properly; however, I have checked it with an OScope and the signal is indeed making it over to the RF card. The problem occurs for SMAC, MAC, and the ZigBee Pro generated code. I have tried commenting out that part of the code to get further; however, it is apparent that the QE128 cannot talk to the RF card properly. The hardware has been checked by myself and two other people to ensure that all the corresponding pins detailed on the 1320xQE128EVB schematic go to the proper pins on the microcontroller with continuity, and so it is probably not a connection issue. Does anyone have any idea what may be going on? Or could point me in any direction to debug this?

 

 

Thank you,

-Justin

Labels (1)
0 Kudos
1 Reply

274 Views
RichTestardi
Senior Contributor II

Hi,

 

I use the DEMOQE board (with both the 9s08 and the 51QE) with an 1320xRFC card.  The 1320xRFC plugs into the top of the board, which was not immediately obvious to me.

 

I unfortunately use my own lightweight protocol stack (you can see it in sources/zigbee.c in http://www.cpustick.com/downloads/skeleton.zip) but I configure my pins as follows for that board configuration:

 

zigbee_rst* ptc0
zigbee_attn* ptc1
zigbee_rxtxen ptf1

 

If you really get desperate you can just load StickOS onto the DEMOQE board (from http://www.cpustick.com/downloads.htm -- there both 9S08 and 51QE versions available) and then poll the 1320xRFC programmatically in BASIC...  The following StickOS program queries the Chip_ID register of the transceiver:

 

> list
  10 dim rst as pin ptc0 for digital output
  20 dim attn as pin ptc1 for digital output
  30 dim rxtx as pin ptf1 for digital output
  40 dim a as byte, d as short
  50 dim n, value
  60 let rst = 0, attn = 0, rxtx = 0
  70 sleep 1 ms
  80 let rst = 1
  90 sleep 100 ms
 100 let n = 0x2c
 110 gosub get
 120 print "chip id", value/256
 130 end
 140 sub get
 150   rem n, returns value
 160   let a = 0x80|n
 170   qspi a, d
 180   let value = d
 190 endsub
end
> run
chip id 96
>

 

You can then verify all your pins are doing what you expect...  You can actually control the SPI interactively with StickOS, which is a nice way to turn on new peripherals (I wrote my lightweight protocol stack largely in BASIC when learning how the transceiver works).

 

-- Rich

 

 

0 Kudos