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.


Topics - tr111

Pages: [1] 2 3
1
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

2
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!
like:
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
MEMORY
{
    /*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
}

3
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!

4
 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??
ResetHalt

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

; Set FLASHBAR (Flash)
writecontrolreg 0x0C04 0x00000061

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

5
    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

#define E_TIMER_NEXT_MESSAGE   1

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

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 );
            }
            break;

        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);
                    break;

                case ARP_RESOLUTION_FAILED:                              // IP address could not be resolved...
                    break;
            }
            break;
        }
    }
}

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

const UTASK_TASK ctNodes[] = { 

...
...

TASK_UDP,

}

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

{ "eUDP", fnUDPWORK, MEDIUM_QUE,   (DELAY_LIMIT)(NO_DELAY_RESERVE_MONO),0, UTASKER_STOP},//udp

}


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



6
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(
         address,
         data,
         reset,
         ale,
         rw_b,
         clk,
         oe,
         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
         cf_address,
         cf_data,
         cf_cd
         );
      
      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
initial
   begin
      cf_we = 1;
      cf_ce = 1;
      data_reg  = 8'b10101101; // card is not connected (173 dec)
   end   
      
// 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;
   end
   cf_ce = ale;
end

// 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)
   end   
end

// 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;

endmodule

7
I want to use the 8 bit mode,but see the lcd.c(_fnWriteDisplay(LCD_CONTROL_PORT_SIZE rs, unsigned char ucData) find that:

IO_BUS_PORT_DAT = DataBus;
but the #define IO_BUS_PORT_DAT          PORTTA
the PORTTA is the 4 pin i/0,that maybe the LCD_BUS_4BIT mode!

Pin 7  DB0  (Data Bus 0 - which to connected)???????
Pin 8  DB1  (Data Bus 1 - which to connected)???????
Pin 9  DB2  (Data Bus 2 - which to connected)???????
Pin 10 DB3  (Data Bus 3 - which to connected)???????
Pin 11 DB4  (Data Bus 4 - always connected)PORTTA[0]
Pin 12 DB5  (Data Bus 5 - always connected)PORTTA[1]
Pin 13 DB6  (Data Bus 6 - always connected)PORTTA[2]
Pin 14 DB7  (Data Bus 7 - always connected)PORTTA[3]

Can the utasker to use the LCD_BUS_8BIT ????????

8
        when I set a breakpoint in the code(utasker) ,and run ,it will stay in the breakpoint,but soon the board will reboot!  I debug in the m52259evb's  flash!
         I do the same in the MQX's code, also debug in the flash it will normal!
         I use the CodeWarrior IDE 7.1.1

         Later I find the reason:#define BACKUP_WATCHDOG_TIMER
         the watdog is the enable!

9
      I get the uTaskerV1.3_Kirin3 and the M52259evb,I want to the usb flash disk ,can read and write file to the usb flash disk in the M52259evb!
     when I test in the freescale's MQX,the MQX is the freescale's OS!
     when I put the usb flash disk to the usb port in the M52259evb,will look like this:
     ************************************************************************
Vendor Information:     CHIPSBNK Mass Storage Device
Product Identification: USB 2.0         
Product Revision Level: 5.00
************************************************************************
--->USB Mass storage device opened
--->Partition Manager installed
--->File System installed
--->File System opened

shell> dir
THUMBS.DB      756224 10-28-2008 02:43:16  HS  A Thumbs.db
5225X_2.JPG     97660 11-24-2008 11:13:26      A 5225X_2.JPG
ADC_INT.HTM      8599 11-25-2008 14:52:48      A ADC_int.htm
ARROW.GIF         105 11-24-2008 11:14:16      A ARROW.GIF
BC_SEP~1.GIF      105 11-24-2008 11:57:58      A bc_seperator.gif


Can the utasker do like this???????

10
hi:
  Now I want to use the the DMA timers to get the 213us  interrupt,I know the #define MILLISEC LOW_RES_MS so that 71us*3=213 ,that is OK!
   Can the the DMA timers always is exactitude???
   for example i want to the led on at  213us,then next to led off at  213us,next to led on,next to led off,and forever like this!
    where to  put the led_on() and led_off() function??
   

11
   Did the utasker use all of the mcf52235 timer interrupt???
   I only want to use one mcf52235 timer interrupt!

12
NXPTM M522XX, KINETIS and i.MX RT / How to use the c++ in the utasker???
« on: February 28, 2008, 12:53:21 PM »
       I want to use the c++ file and use the "class".but in the cw6.4 is always error when I add the *.cpp file????
       How can I do!

13
   I use the cw6.4,but compile error:
Error   : undefined identifier 'POINTER_USER_NAME'
webutils.c line 282           if (fnCheckPass(POINTER_USER_NAME, cDecodedUser)) return CREDENTIALS_REQUIRED; // return if user name match not valid {

Error   : undefined identifier 'POINTER_USER_PASS'
webutils.c line 285           if (fnCheckPass(POINTER_USER_PASS, cPass)) return CREDENTIALS_REQUIRED; // return if user password is not good {4} 

14
  my 52235 run  in the lpb mode,I can sent the data,but now I want to get data???
 
  tCANParameters.ulTxID = 0x80000000;       // default ID of destination                           
  tCANParameters.ulRxID = (CAN_EXTENDED_ID | 0x00000000);  // our ID
  the ulTxID and ulRxID must be same  to send data to itself????

   the destination ID I am not sure!

   int the "static void fnCanInt(int iIntBuf)",
    it will goto the"else {
        COLDFIRE_CAN_BUF *ptrMessageBuffer = MBUFF0_ADD;
        ptrMessageBuffer += iIntBuf;
        *(unsigned char *)ptrMessageBuffer = 0;                          // deactivate buffer so that it doesn't get overwitten
         
        can_int_message[MSG_INTERRUPT_EVENT] = CAN_RX_MSG;               // Rx message received
        ptrCanQue->ucMode |= CAN_RX_BUF_FULL;                            // Indicate message waiting
      }"

I don't konw which to add the "
......   case INTERRUPT_EVENT:     // on an interrupt event
            switch (ucInputMessage[MSG_INTERRUPT_EVENT]) {
            case CAN_RX_MSG::      // A CAN rx. message is waiting
                Length = fnRead(CAN_interface_ID, ucInputMessage,
                         (0 | GET_CAN_RX_TIME_STAMP | GET_CAN_RX_ID));
                          // collect the message along with some details
                break; ......
"

is In the "
void fnApplication(TTASKTABLE *ptrTaskTable)  // Application task".

that has the "case INTERRUPT_EVENT:
            switch (ucInputMessage[MSG_INTERRUPT_EVENT]) {
            case TX_FREE:
                if (iAppState == STATE_BLOCKED) {                        // The TCP buffer we were waiting for has become free
                    iAppState = STATE_ACTIVE;
                }
                break;"

I add the "case CAN_RX_MSG::      // A CAN rx. message is waiting
                Length = fnRead(CAN_interface_ID, ucInputMessage,
                         (0 | GET_CAN_RX_TIME_STAMP | GET_CAN_RX_ID));
                          // collect the message along with some details
                break;
" to the fnApplication,but I can't get the data! I want to get the data that I sent.
  How can I get the data!

15
NXPTM M522XX, KINETIS and i.MX RT / about the can_bus of the mcf52235
« on: November 29, 2007, 03:16:01 AM »
     I have success in doing send the data from the CAN-bus using Utasker!
     the Utasker is great!
     like this:
     static void fnConfigCAN_BUS(void)
{
CANTABLE tCANParameters; // table for passing information to driver
tCANParameters.Task_to_wake = OWN_TASK; // wake us on buffer events
tCANParameters.Channel = 0;        // first hardware interface       
 tCANParameters.ulSpeed = 100000;    // 100K speed
tCANParameters.ulTxID = 0x000;       // default ID of destination                           
tCANParameters.ulRxID = (CAN_EXTENDED_ID | 0x00000105);  // our ID
                       
tCANParameters.ulRxIDMask = CAN_EXTENDED_MASK;
                                // use all bits for compare
tCANParameters.usMode = 0x00;      // 1 use for lpb mode
tCANParameters.ucTxBuffers = 2; // assign two tx buffers for use
tCANParameters.ucRxBuffers = 3; // assign three rx buffers for use

CAN_interface_ID = fnOpen( TYPE_CAN, FOR_I_O, &tCANParameters );


 }


static void fnSENDCAN_BUS(void)
{

unsigned char ucTestMessage[] = {0xab,0xcd,0xef,0x52,0x23,0x5e,7};  // Test message
if (fnWrite(CAN_interface_ID, ucTestMessage, sizeof(ucTestMessage))
                                 != sizeof(ucTestMessage)) {
    // Error. Eg. no transmission buffer free
fnDebugMsg("\n\r SENT ERROR\n\r");

}

 I will get some data for the SJA1000!
 07 00 00  ab cd ef 52 23 5e 07
 the first is the length.
 00 00 is the default ID of destination !
 Is something question about the  default ID of destination !
 I don't know why I send the only "unsigned char ucTestMessage[] = {0xab,0xcd,0xef,0x52,0x23,0x5e,7};  "
 but get the 07 00 00  ab cd ef 52 23 5e 07! is too more???
 the Standard ID[28:18] Extended ID[17:0] is include???????
 tCANParameters.ulRxID = (CAN_EXTENDED_ID | 0x00000105);  // our ID
 how can send to the "our ID"form MY sja1000! the id is the 0x105 or the 0x10500000????
 I am not sure?????


 The message buffer structure used by the FlexCAN module is shown in Figure 30-13. Both standard andextended frames used in the CAN Specification Version 2.0, Part B are represented. A standard frame isrepresented by the 11-bit standard identifier, and an extended frame is represented by the combined 29-bits of the standard identifier (11 bits) and the extended identifier (18 bits).

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0x0 CODE SRR IDE RTR LENGTH TIME STAMP
0x4 Standard ID[28:18] Extended ID[17:0]
0x8 Data Byte 0 Data Byte 1 Data Byte 2 Data Byte 3
0xC Data Byte 4 Data Byte 5 Data Byte 6 Data Byte 7

Pages: [1] 2 3