Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - tr111

Pages: [1] 2 3 ... 5
when I use the mcf52235evb the H_Upload.bin  use the FTP upload to the mcf52235evb is ok can earse the flash at 0x800 and run new use code!
but I use the mcf52259evb the H_Upload.bin  use the FTP upload to the mcf52259evb ,that can not earse
the flash and updating the code.after reboot  in the ftp server the H.bin is also at the ftp server.
when I use the HTTP upload,it can can earse the flash at 0x1000 and write the H.bin to the falsh,but I code is at 0x800 to updating,so I must change code to 0x1000 that is ok to run .
I undef the
//#define SPI_SW_UPLOAD                                                // SW upload to SPI FLASH support enabled

when I built the M5225x_BM_rom use uTaskerM522XX_V1.4-11 and CW7.1
 the board can not run, because the uTasker_boot.bin and the uTasker_BM.bin is err in the beginning in the file! when I progarm the uTasker_boot.S19 and the uTasker_BM.S19 to the board ,and the read back to the file to bin file from the board ,I find the s19 file is not same as the uTasker_BM.bin and theuTasker_boot.bin at the beginning!
when I use the CW7.2 it can built the  uTasker_boot.rbin and the uTasker_BM.rbin that is right, it can run at the board!
SET PATH=%PATH%;..\..\..\..\tools
uTaskerCombine "..\..\..\uTaskerBoot\CodeWarrior_M5223X\bin\uTasker_boot.rbin" uTasker_BM.rbin 0x800 uTaskerBM_APP.rbin
uTaskerConvert.exe uTasker_BM.bin H_Upload.bin -0x1234 -a748b6531124

the M5225X_BOOT_APP_FLASH.lcf must to change
    /*flash   (RX)   : ORIGIN = 0x00006080, LENGTH = 0x0003f800*/
    flash   (RX)   : ORIGIN = 0x00000800, LENGTH = 0x0003f800
   vectorram(RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000400
   sram   (RWX)  : ORIGIN = 0x20000400, LENGTH = 0x00007C00       
   ipsbar  (RWX)  : ORIGIN = 0x40000000, LENGTH = 0x0

I found WHY!
the J9 and the J10 must set to the FEC_MDC and FEC_MDIO!

I use the CW7.2.2 ,and build the uTasker_full.elf.S19 then program to the mcf52259evb board.but the ETHERNET didn't can ping ok,the ftp also fail!

Table 17-7. CFM Security States
SEC[15:0] Description
1 This value was chosen because it represents the ColdFire HALT instruction, making
it unlikely that a user compiled code accidentally programmed at the security
configuration field location would unintentionally secure the flash memory.
Flash Memory Secured
All other combinations Flash Memory Unsecured!
Flash memory security bits
The SEC bits define the security state of the MCU as shown in Table 17-7, which defines the single code
that enables the security feature in the CFM
 * File:   flash_config.s

   .global FLASH_CONFIG
   .global _FLASH_CONFIG   

 * FLASH configuration
.long 0x11223344
.long 0x55667788
.long 0x00000000
.long 0x00000000
.long 0x00000000
.long 0x80004AC8

I get from

Re: Erasing Secured Flash.Options
Mark as NewBookmarkSubscribeSubscribe to RSS FeedHighlightPrintEmail to a FriendReport Inappropriate Content....2010-06-15 11:20 PM

P&E Micro have an application that will unsecure the flash.


Click on "FAQs, Manual's & Download's"

Then look for UNSECURE CF on right side of page.


You must place the ColdFire device into JTAG mode (usually a jumper setting on the EVB).

Set jumper so PSTCLK goes to pin 6 rather than pin 24 on the BDM header.

Use the P&E USB Multilink hardware.



that mcf52235 and mcf52259 is ok!~

 I use the M52235EVB_SEC_FLASH.lcf to make the uTasker_boot_secure.S19.
 then I program the uTasker_boot_secure.S19to the board ,
 but something is err when after  programed , the board can not earse and program.
 I never see the "
# * File:       M52235EVB_SEC_FLASH.lcf
# *             WARNING: don't use unless you want to secure the chip and have a method of unsecuring in emergencies!!
How can  I do??  to change the MCF52235.cfg in the CW7.1??

; Set VBR to the beginning of what will be SRAM
; VBR is an absolute CPU register
writecontrolreg 0x0801 0x20000000
writecontrolreg 0x0C05 0x20000021

; Set FLASHBAR (Flash)
writecontrolreg 0x0C04 0x00000061

; Enable PST[3:0] signals
writemem.b 0x40100074 0x0F

NXPTM M522XX, KINETIS and i.MX RT / Re: Flexbus pin
« on: January 07, 2010, 03:48:35 AM »
HOW to use the IS61C25616AL  in utasker??  
Can you show you code???
CAN it use as the mcf52259's 64Kbyte SRAM????
I have see the example,it use the pointer!
Can it use as the SRAM if the address is continuous with the 64Kbyte SRAM !
So the RAM is 64K+outside RAM,don't like the pointer usage!

//DES added mb_init code
      static int i;
      static int8 j;
      static int tempi;
    * Enable MiniBus CS0 for MRAM access

   MCF_MB_CSAR(0) = (0

   MCF_MB_CSCR(0) = (0
      | MCF_MB_CSCR_SWS(0)
      | MCF_MB_CSCR_SWSEN(0)
      | MCF_MB_CSCR_ASET(0)      //DES was 3
      | MCF_MB_CSCR_RDAH(0)      //DES was 3
      | MCF_MB_CSCR_WRAH(0)      //DES was 3
      | MCF_MB_CSCR_WS(1)         //DES was 20
      | MCF_MB_CSCR_MUX(0)
      | MCF_MB_CSCR_AA(1)
      | MCF_MB_CSCR_PS(1)
      | MCF_MB_CSCR_BSTR(0)
      | MCF_MB_CSCR_BSTW(0));

   MCF_MB_CSMR(0) = (0
      | MCF_MB_CSMR_BAM(0x007f)
      | MCF_MB_CSMR_V(1));
      for(i=0,j=0; i<0x80000; i++)
         (*(vuint8 *)(0x80000000 + i)) = j++;      //write

      for(i=0; i<0x80000; i++)
         tempi = (*(vuint8 *)(0x80000000 + i));   //read


NXPTM M522XX, KINETIS and i.MX RT / Re: Flexbus pin
« on: January 05, 2010, 10:34:16 AM »
external Ram chip??
WHAT is the chip type?



I find the why!

the will run the one time!

if set the uTaskerStateChange(TASK_UDP, UTASKER_ACTIVATE) at the other task,
it will run more times!

    I want use the udp,and the code is that !
Code: [Select]

    #include "config.h"

#define OWN_TASK             TASK_UDP

#define UDP_BUFFER_SIZE        200                                        // buffer size for UDP test message
#define MY_UDP_PORT            1999


typedef struct stUDP_MESSAGE
    unsigned short usLength;
    UDP_HEADER     tUDP_Header;                                          // reserve header space
    unsigned char  ucUDP_Message[UDP_BUFFER_SIZE];                       // reserve message space

static int fnUDPListner(USOCKET SocketNr, unsigned char ucEvent, unsigned char *ucIP, unsigned short usPortNr, unsigned char *data, unsigned short usLength)
    return 0;

void fnUDPWORK(TTASKTABLE *ptrTaskTable) 
    static USOCKET MyUDP_Socket = -1;
    static UDP_MESSAGE *ptrUDP_Frame;
    const unsigned char ucIP[IPV4_LENGTH]= {192, 168, 0, 37};
    QUEUE_HANDLE        PortIDInternal = ptrTaskTable->TaskID;           // queue ID for task input
    unsigned char       ucInputMessage[HEADER_LENGTH];                   // reserve space for receiving messages

    if (MyUDP_Socket < 0) {                                              // only perform once
        ptrUDP_Frame    = uMalloc(sizeof(UDP_MESSAGE));                  // get some memory for UDP frame   
        MyUDP_Socket = fnGetUDP_socket(TOS_MINIMISE_DELAY, fnUDPListner, (UDP_OPT_SEND_CS | UDP_OPT_CHECK_CS));
        fnBindSocket(MyUDP_Socket, MY_UDP_PORT);
        uMemcpy(&ptrUDP_Frame->ucUDP_Message, "Hello World", UDP_BUFFER_SIZE);
        fnSendUDP(MyUDP_Socket, (unsigned char *)ucIP, MY_UDP_PORT, (unsigned char*)&ptrUDP_Frame->tUDP_Header, sizeof("Hello World"), OWN_TASK);
        uTaskerMonoTimer( OWN_TASK, (DELAY_LIMIT)(10*SEC), E_TIMER_NEXT_MESSAGE );

    while ( fnRead( PortIDInternal, ucInputMessage, HEADER_LENGTH )) {   // check input queue
        switch ( ucInputMessage[MSG_SOURCE_TASK] ) {                     // switch depending on message source
        case TIMER_EVENT:
            if (E_TIMER_NEXT_MESSAGE == ucInputMessage[MSG_TIMER_EVENT]) {
                fnSendUDP(MyUDP_Socket, (unsigned char *)ucIP, MY_UDP_PORT, (unsigned char*)&ptrUDP_Frame->tUDP_Header, sizeof("Hello World"), OWN_TASK);
                uTaskerMonoTimer( OWN_TASK, (DELAY_LIMIT)(10*SEC), E_TIMER_NEXT_MESSAGE );

        case  TASK_ARP:
            fnRead( PortIDInternal, ucInputMessage, ucInputMessage[MSG_CONTENT_LENGTH]); // read the contents
            switch (ucInputMessage[ 0 ]) {                               // ARP sends us either ARP resolution success or failed
                case ARP_RESOLUTION_SUCCESS:                             // IP address has been resolved (repeat UDP frame).
                    fnSendUDP(MyUDP_Socket, (unsigned char *)ucIP, MY_UDP_PORT, (unsigned char*)&ptrUDP_Frame->tUDP_Header, sizeof("Hello World"), OWN_TASK);

                case ARP_RESOLUTION_FAILED:                              // IP address could not be resolved...

in the TaskConfig.h
#define TASK_UDP             'e'                                      // UART2 task

const UTASK_TASK ctNodes[] = { 




in the const UTASKTABLEINIT ctTaskTable[] = {.....



I find the fnUDPWORK never run at (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO),!!!!!
but set (DELAY_LIMIT)(0.2 * SEC) the fnUDPWORK will run ,

NXPTM M522XX, KINETIS and i.MX RT / the CFCARD in the mcf52259evb
« on: July 03, 2009, 09:48:55 AM »
     the MQX have given the cpld logic to the CFCARD,how can the utasker to use the CFCARD,I think the CFCARD is about the flexbus using at file system!

  // Minibus CPLD
  // 8-bit Non-Muxed Mode
//Top module

module cpld_8bit(
         cf_ce,             //Active low Card select signal
         cf_oe,            //Active low Output enable strobe
         cf_reset,         //Reset the compact flash card
         cf_reg,            //Low during I/O operations,in memory mode used to distinguish betwen common and attribute memory
         cf_we,            //Active low signal used for writing configuration registers
      output [10:0] cf_address;
      output [7:0] cf_data;
      input [19:0] address;
      input reset;
      input ale;
      input rw_b;
      input clk;
      input oe;
      input [1:0] cf_cd;
      output [7:0] data;
      output cf_ce;
      output cf_we;
      output cf_reg;
      output cf_oe;
      output cf_reset;
      reg  cf_we;
      reg  cf_ce;
      reg  [7:0] data_reg;
// initial settings
      cf_we = 1;
      cf_ce = 1;
      data_reg  = 8'b10101101; // card is not connected (173 dec)
// connect reset directly
assign cf_reset = ~reset;

// on every cs1 change cf_ce and cf_we generation
always @(ale) begin
   // if active ce1- then connect rw to cf_we signal
   if ((rw_b == 0) && (ale == 0)) begin      //write
      cf_we = 0;
   end else begin                      //read or cs1 was changed to 1
      cf_we = 1;
   cf_ce = ale;

// card detection
always @(cf_cd) begin
   if (~cf_cd[0] & ~cf_cd[1]) begin
      data_reg  = 8'b11100101; // card is connected send (229 dec)
   end else begin
      data_reg  = 8'b10101101; // card is not connected (173 dec)

// addr n.13 is used for card detecting
assign data = (~ale & ~oe & address[13])  ? data_reg : 8'bz;

// connect directly oe for (active - zero during read)
assign cf_oe = oe;

// connect first 11 addr bytes directly on output
assign cf_address = address[10:0];

// connect addr bit n.12 directly on reg cf pin
assign cf_reg = address[12];

//Debug signals on J19
assign cf_data[0]=cf_reset;
assign cf_data[1]=cf_oe;
assign cf_data[2]=cf_we;
assign cf_data[3]=cf_ce;
assign cf_data[4]=cf_reg;
assign cf_data[5]=address[12];
assign cf_data[7:6]=2'b11;


NXPTM M522XX, KINETIS and i.MX RT / Re: cf flasher for 52259
« on: June 22, 2009, 04:56:13 AM »
CF Flasher config for the MCF52259
I do the config and send the email to MARK!
CF Flasher config for the MCF52259

send from?"" <>
send to?"Mark" <>?"Mark" <>

if anyone want it ,send email to me!


i give you this:

CF Flasher is Version 3.1.10
the CFM(256Kx16x1).alg to this:
C:\Program Files\Freescale\CF Flasher\alg\
the M52259EVB.cfg to this:
C:\Program Files\Freescale\CF Flasher\cfg\

Pages: [1] 2 3 ... 5