[mc1322x] OpenOCD custom proc

Mariano Alvira mar at devl.org
Mon Jun 7 13:51:27 EDT 2010


On Mon, Jun 07, 2010 at 01:40:13PM -0400, Jon Smirl wrote:
> On Mon, Jun 7, 2010 at 1:22 PM, Jon Smirl <jonsmirl at gmail.com> wrote:
> > On Mon, Jun 7, 2010 at 1:14 PM, Daniel Berenguer
> > <dberenguer at usapiens.com> wrote:
> >> Yes, that's an option... So in your daily job you just write the RAM
> >> through serial? I may do this too I guess, to avoid useless flash
> >
> > That's what I do. I've never flashed my development boards from Mar.
> 
> Mar, I had the boards working at 921,600 baud.
> in cpu/mc1322x/uart1.c
> 
> I changed this:
> #define INC 3071 /* 921,600 */
> 
> and turned flow control on
> reg32(UART1_CON) = 0x00001403; /* enable receive and transmit */
> 
> Is this all that is needed? I've forgotten exactly what I did. I had
> to modify to loader script too.

Yeah basically. (MOD and SAMP have to be set right). See
tests/config.h:

/* Baud rate */
#define MOD 9999
/*  230400 bps, INC=767, MOD=9999, 24Mhz 16x samp */
/*  115200 bps, INC=767, MOD=9999, 24Mhz 8x samp */
#define INC 767
/*  921600 bps, MOD=9999, 24Mhz 16x samp */
//#define INC 3071                                                                                                                                            
#define SAMP UCON_SAMP_8X
//#define SAMP UCON_SAMP_16X

> Will the bootloader work at 921,600? It will autobaud to 921,600 but
> does it have flow control enabled? Without flow control it overruns
> the ft2232.

The chipside bootloader should. mc1322x-load.pl relies on some very
sketchy USB/Linux timing --- so it probably won't. Flasher is also
slow --- it would need to do batch writes instead of byte at a time to
go that fast.

Andrew's red-bsl with the freescale loader might do it. If not then we
probably need a load script written in C and an updated flasher.c.

And if flashing fast is the priority, and you have JTAG, then I would
consider adding flashing to OpenOCD and skip the serial bootloader
altogether.

> The idea is to reduce the latency when using the board in linux-serial
> mode. Latency on 802.15.4 nets is more of a problem than throughput.

That makes sense, although you don't need the bootloader to work at
921600. You can load the serialdev code and then reopen the port at
the higher baudrate.

-Mar.



More information about the mc1322x mailing list