Skip to content

Latest commit

 

History

History

CC2538DK

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

CC2538DK

The CC2538DK is Texas Instruments' developer kit for the CC2538 SoC MCU, which combines an ARM Cortex-M3 microcontroller with an IEEE802.15.4 radio.

Overview

  • CC2538: 32-bit Arm Cortex-M3 Zigbee, 6LoWPAN, and IEEE 802.15.4 wireless MCU with 512kB Flash and 32kB RAM

cc2538dk

MCU CC2538SF53
Family ARM Cortex-M3
Vendor Texas Instruments
RAM 32KiB
Flash 512KiB
Frequency 32MHz
FPU no
Timers 4
ADCs 1x 12-bit (8 channels)
UARTs 2
SPIs 2
I2Cs 1
Vcc 2V - 3.6V
Datasheet Datasheet (pdf file)
Reference Manual Reference Manual

Unlock Backdoor

When you first got the CC2538DK, it is in the ship mode(locked out), The bootloader will be normally executed directly after reset, if there is no valid image exists in the flash. If you want to flash your own firmware, you need to unlock the backdoor first.

  1. Using Ti Flash Programmer to change the value at address 0x27FFD7 to 0xF3FFFFFF
  2. Holding down the select button while pushing the EM reset button before flash

Serial Driver

Linux

sudo modprobe ftdi_sio vendor=0x403 product=0xa6d1
# switch to the root user
echo 0403 a6d1 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id

Windows

Flash

Note: Holding down the select button while pushing the EM reset button before flash

For open source codes, using cc2538-bsl to flash the firmware.

  1. RIOT: python /path/to/cc2538-bsl/cc2538-bsl.py -p "/dev/ttyUSB<x>" --write-erase -v -b 460800 /path/to/<firmware>.bin

  2. Contiki-NG: python /path/to/cc2538-bsl/cc2538-bsl.py -e -w -v -a 0x00202000 /path/to/<firmware>.bin

If cc2538DK export /dev/ttyUSB0 and /dev/ttyUSB1, remember to use /dev/ttyUSB1

Debug

XDS100v3

XDS100v3 is a on-board debugger, to enable debugging without external debugger.

  1. download the TI GDB server/agent via XDS simulation
  2. The GDB server is in /path/to/ti/common/uscif/gdb_agent_console[.exe]
  3. Download the AN128 which contain the dat file for debug
  4. unzip the downloaded AN128 zip, the dat file is CC2538_XDS100v3c2_linux.dat
  5. open the gdb server using command:
/path/to/ti/common/uscif/gdb_agent_console /path/to/AN128/CC2538_XDS100v3c2_linux.dat

JTAG

  1. connect JLink/JTag with the J-TAG 20-pin header on the cc2538dk (SmartRF06) boards

  2. open JLinkGDBServer in one session

JLinkGDBServer -device CC2538SF53 -endian little -if JTAG -port 2331
  1. open gdb in another session and connect gdb server thourgh 2331 port
arm-none-eabi-gdb <firmware.elf> -ex 'target remote :2331'

Ozone

Make sure use JTAG as target interface in Connection Settings of Ozone

Ozone Setting

NOTE!!! Contiki-NG use cc2538's watchdog timer by default, debugging will trigger watchdog's timeout, causing the system to reboot, so Contiki-NG can only be debugged after commenting out the watchdog code.

References