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 4 5
16
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 ????????

17
The MCF52259 is connected to the MRAM via the Mini-FlexBus 8-bit non-multiplexed mode.The AD0 signal (as well as AD0) is used to select upper byte or lower byte in a 16-bit word of the 16-bit MRAM.
    I think the 8-bit data bus is slower than the Int.FLASH!Because the code is download all to the the Ext.MRAM when in Ext.MRAM debug!

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

19
Sorry !
        I run the MQX at the EXT. MRAM ,so ping is slow!
        I think the MRAM's bus is very slow!
        when I run the MQX at the Int.flash,it do the same as the utasker!

20
      Also I found the utasker is faster than MQX when doing ping IP!

21
      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???????

22
hi:
   that is great!
   this code! maybe 1S!

   // Routine to initialise the Periodic Interrupt Timer interrupt
//

/* Bit definitions and macros for MCF_PIT_PMR */
#define MCF_PIT_PMR_PM(x)                    (((x)&0xFFFF)<<0)
#define PIT_PRESCALE1  0x0f00
#define TICK_DIVIDE1    MCF_PIT_PMR_PM(0x3e7);
/**************************** Periodic Interrupt Timer interrupt ******************************************/

static __interrupt__ void _PIT1Interrupt(void)
{
  PIT_PCSR_1 = (PIT_PRESCALE1 | PIT_DBG | PIT_OVW | PIT_PIF | PIT_RLD | PIT_PIE | PIT_EN); // Reset interrupt request flag
 // fnDebugMsg("tt"); 
 PORTTC ^= PORT_TC_BIT3;
}

extern void fnPITStartTick(void)
{
    PIT_PCSR_1 = (PIT_PRESCALE1 | PIT_DBG | PIT_OVW | PIT_PIF | PIT_RLD); // prepare for load
    PIT_PMR_1 = TICK_DIVIDE1;                                             // load interval value

    fnSetIntHandler(PIT1_VECTOR, (unsigned char *)_PIT1Interrupt);

    IC_ICR_0_56 = TICK_INTERRUPT_PRIORITY;                               // define interrupt level and priority
    IC_IMRH_0 &= ~(PIT_1_PIF_INT_H);                                     // unmask interrupt source
    IC_IMRL_0 &= ~(MASK_ALL_INT);                                        // clear global mask {5}

    PIT_PCSR_1 = (PIT_PRESCALE1 | PIT_DBG | PIT_OVW | PIT_PIF | PIT_RLD | PIT_PIE | PIT_EN); // start PIT with interrupt enabled

#ifdef _GNU
    asm_int_on();
#endif
}

23
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??
   

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

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

27
   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} 

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

29
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

30
   I have know the work in loopback mode,this is FlexCAN performs an internal loop
back that can be used for self test operation.
   But how can I get the data from I send!
   I don't know that
    Receiving CAN data messages
When a CAN data message is received it is placed in a free receive buffer and the owner task is notified of the fact via an interrupt event. It can then pick up the data by calling the generic fnRead(). It is not necessary to specify the read length since data should be read as a block from a single buffer, however there are a number of options available.
......   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; ......
Can that more detail, tell me how to do in utasker?????????
the freecale give me some code:
this the interrupt

 MCF_GPIO_PASPAR=MCF_GPIO_PASPAR_SYNCA_CANRX|MCF_GPIO_PASPAR_SYNCB_CANTX;
                         
                         
   
   /* FlexCAN Soft Reset */
   MCF_FlexCAN_CANMCR = MCF_FlexCAN_CANMCR_SOFTRST;
   while ((MCF_FlexCAN_CANMCR & MCF_FlexCAN_CANMCR_SOFTRST) != 0x0) {}
   
   /* initialize FlexCANs */         
   init_flexcan();
   
   /* initialize FlexCAN interrupts */
   init_flexcan_interrupts();
   
   /* zero message in receive buffer 1 */
   * (vuint32 *) (FLEXCAN_BUFFERS + 0x18) = 0x00000000;
   * (vuint32 *) (FLEXCAN_BUFFERS + 0x1C) = 0x00000000;
   
   printf("DONE\n\r");
   
      printf("Received buffer before sending: 0x%08x 0x%08x\n\r", * (vuint32 *) (FLEXCAN_BUFFERS + 0x18), * (vuint32 *) (FLEXCAN_BUFFERS + 0x1C));   
   
   
   /* transmit a message from transmit buffer 0 */   
   * (vuint32 *) (FLEXCAN_BUFFERS + 0x8) = 0xABCD0022;
   * (vuint32 *) (FLEXCAN_BUFFERS + 0xC) = 0xBABA1234;      
   
   MCF_FlexCAN_CANMCR &= ~(MCF_FlexCAN_CANMCR_HALT); //leave HALT
   
   /* await for synchronisation */
   for (i=1;i<255;i++) {}   
   
   //from some reason, this didn't work in loopback mode   
   //while (MCF_CAN_CANMCR0 & MCF_CAN_CANMCR_NOTRDY == MCF_CAN_CANMCR_NOTRDY) {}
      
   * (vuint16 *) FLEXCAN_BUFFERS = 0x0C08; //write CODE for transmission of 8 bytes   

/*********************************************************************************************/
__declspec(interrupt)
void Rx_Buffer1(void)
{
   /* display received data */
   printf("Received data after sending: 0x%08x 0x%08x\n\r", * (vuint32 *) (FLEXCAN_BUFFERS + 0x18), * (vuint32 *) (FLEXCAN_BUFFERS + 0x1C));   
   
   MCF_FlexCAN_IFLAG|=  MCF_FlexCAN_IFLAG_BUF1I;
}


Pages: 1 [2] 3 4 5