Welcome, Guest

Author Topic: Problems with iMX233-OlinuXino-MAXI and SJTAG  (Read 1657 times)


  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Problems with iMX233-OlinuXino-MAXI and SJTAG
« on: July 25, 2014, 12:15:10 PM »

I'm struggling to get the SJTAG board + ARM-USB-TINY-H to Reset the the iMX233 MAXI board.

If I power on in a certain order I can get the board to Halt, Load and single step code using DGB and Nemiver so I'm almost there it's just Reset is eluding me :-(

When I try Monitor Reset from GDB the board continues to run and the SJTAG green LED stopps flashing fast and instead is constantly on.

I'm running on Centos 6.X and basically following the Tutorial on Christians Blog:

I've tried a number of versions of Open OCD including :-
git checkout 0.8.0-dev-00121-ga4d3446
git checkout 0.6.0-dev-00448-gc59a441

And various combinations of LIBUSB and the FTDILIB drivers.

This is the order I start things :-

Put SD card into Slot
Power Olimewx imx233 board --> LED starts flashing at 1Hz
Power SJTAG with USB cable
Connect A-B cable to Tiny-H

Start OpenOCD
cd /home/brozier/ARM/SJTAG-Example
openocd -f olimex-arm-usb-tiny-h.cfg -f imx233.cfg  --debug 3

Green LED on SJTAG card will flash quickly
Start GDB
cd /home/brozier/jan_cc_examples/blink_led/
arm-none-eabi-gdb --command=init.gdb output/blink_led.elf

My current guess is one of these :-
1) My Flash LED example software is not setting up the hardware properly.
2) Issue with SJTAG hardware? Christian mentions using reset switch on SJTAG which mine was not fitted with - I did add one but no effect.
3) Incorrect start order.

Could you point me to a known good SD card image which does enable SJTAG? What did you use to get the results in SJTAG_TINY-H_imx233_openOCD.zip?

Can you tell me what order the board, JTAG and SJTAG are powered and do any reset buttons need to be pressed?

I have 300MHz scope and Logic analyser but I cannot really find enough information on SJTAG to debug it. Can you tell me what to look for? Or what I should be looking for on the JTAG side?



  • Jr. Member
  • **
  • Posts: 61
  • Karma: +3/-0
    • My blog
Re: Problems with iMX233-OlinuXino-MAXI and SJTAG
« Reply #1 on: July 25, 2014, 04:45:48 PM »
Hi Bryan,

I try to help as much as I can ... hopefully ;-)

The button on Christians Olimex Serial JTAG adapter is not reset, it's more a sync. Sometimes the iMX233 SoC and the adapter gets out of sync. Pressing the button gets the two syncing again.

The button is not soldered by Olimex. I soldered the big yellow one on Christians adapter before sending the adapter to him because I figured out that I need the button sometimes.

Regarding the reset:

The reset works fine for me if I use our own Board and connect all the 4 wires from the SJTAG board (including SJTAG_PSW and PWR_E) (PWR_E jumper is not set). If I only connect SJTAG_DBG and GND the reset issued by OpenOCD is not working (meaning the 'reset' command resets the JTAG adapter, but not the iMX SoC), but I never found out why. Though, I never tried with a Olimex board.

How is your SJTAG connected?

You can try the following steps to do a reset:

- halt the system
- reset the cpu by setting HW_CLKCTRL_RESET to 1 or 2 (mww 0x80040120 1 within openOCD)

  1: will reset the digital sections of the chip. The DCDC and power module will not be reset.
  2: will reset the ENTIRE chip, no exceptions.

- reset the JTAG (openOCD reset command)

Code: [Select]
# Define convenience variables
set $HW_CLKCTRL_RESET = 0x80040120

# Resets iMX233 by hardware
define hwreset
    set {uint32_t*}$HW_CLKCTRL_RESET = 2

Btw: software breakpoints: are they working for you within openOCD/gdb? I can't get them working with ARM-USB-TINY-J, with JLINK they are working fine.