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 - Mamim

Pages: [1]
1
µTasker general / Re: utasker
« on: September 22, 2017, 05:01:25 AM »
hi Mark,
1. The VS2017 is working now
2. regarding COM0COM for UART loopback:  I changed
Code: [Select]
#define SERIAL_PORT_0     0 but I was unable open COM 0 on tera term .and simulate on VS  am I missing something?
3. IRQ : I enabled the the interrupt on botth edges and i've modified the IRQ handler as follows
Code: [Select]
           case IRQ11_EVENT:
                        fnDebugMsg("11");
if (PORTGP & PORT_GP_BIT3)
fnDebugMsg("Low Edge");
else fnDebugMsg("High Edge");
                        break;

Code: [Select]
   interrupt_setup.int_port_bit = 11;                                   // the IRQ input connected (on all devices)
    interrupt_setup.int_port_sense = IRQ_BOTH_EDGES;       
I download the cod to the EVB and It detect both edges when I press the SW3 but I the debugger always print "Low Edge" . is it possible to read the BIt on PORT GP when we get the interrupt??

thanks for your help!!

2
µTasker general / Re: utasker
« on: September 20, 2017, 11:08:53 AM »
Thanks as always for your quick response.
now I was able to run VS2017 with fresh uTasker and as you highly recommended I see it is very helpful.
but when I commented  Kirkin3 , #define _M5225X in config.h I was unable to compile it see the attached.
Code: [Select]
#ifdef _M5223X
  //#define _M521X                                                       // basic CAN MCU
  //#define _M528X                                                       // with SDRAM interface and FEC
  //#define _M520X                                                       // with SDRAM interface and FEC but no internal FLASH - up to 166MHz
  //#define _M523X                                                       // with SDRAM interface and FEC but no internal FLASH - up to 150MHz
  //#define _M521XX                                                      // basic MCU
  //#define _M5221X                                                      // USB family
  //#define _M5222X                                                      // USB family
   // #define _M5225X                                                    // Kirin3
 
is _M5225X(Kirin3)   required for the M52235EVB?
Also please advise how I can setup the Tera Term to communicate with the VS2017 simulator? I set up with correct BUAD rate and com# but I don't see any communications to the simulator and I don't see the menu.

Thanks for the support.

3
µTasker general / Re: utasker
« on: September 20, 2017, 12:00:15 AM »
mark,
I have attached the files.
I created my own header  file so that I can modify to include more in the future.
I commented part of the code so that I could run sample code "fnMyFirstTask"
 try to uncomment the section that I have commented in MyTask.c and all the error will show up.
I have updated Taskconfig.h to include this simple task.
as you mentioned earlier since I've copy paste from standard and sample code I might be missing something

thanks

4
µTasker general / Re: utasker
« on: September 19, 2017, 11:16:25 PM »
Dear Mark,
see the attached error msg its a lot.
I've installed now VS2017 and also I got error "unable to start program. see the attached
I've included the config.h header file .  probably I'm missing on the basic of utasker. appreciate if you can or someone provide the frame work of the tasks that I can start with.
I was able to run the sample fnMyFirstTask with no issue.

thanks.



5
µTasker general / Re: utasker
« on: September 18, 2017, 04:01:34 PM »
Thanks Mark for your reply.
I’m using CW7.1and  I don’t have VS.
 for now I’ve started working on UART and disabled the menu option.
On the following thread you include protocol based messaging sample code which I think could be my start point in implementing user defined serial protocol where I can process the messages once the message is received completely
http://www.utasker.com/forum/index.php?topic=56.0
I modified fnMyFirstTask as below but i'm getting error
Code: [Select]
extern void fnMyFirstTask(TTASKTABLE *ptrTaskTable)
{
static unsigned char ucCounter = 0;
static int iRxCnt;
while (fnRead( SerialPortID, &ucInputMessage[iRxCnt], 1 )) {                 // while bytes waiting at input
    if (STATE_RECEIVING == iProtState) {
      if (ucInputMessage[iRxCnt] == CONTROL_CHAR) {
        iProtState = STATE_ENDING;                                       // possible packet end being received
      }
      else {
        iRxCnt++;                                                        // keep the received byte
      }
    }
    else if (STATE_ENDING == iProtState) {
      if (ucInputMessage[iRxCnt] == END_BYTE) {
        fnProcessRx(ucInputMessage, iRxCnt);                             // remove end byte from buffer
        iProtState = STATE_ACTIVE;                                       // complete message has been collected
        iRxCnt = 0;                                                      // flush old data - ready to receive new in our input buffer
        ucInputMessage[1] = 0;                                           // ensure zero terminated (for Linux console)
      }
    }
PORTTC ^= PORT_TC_BIT1;//TOGGLE_LED1(); 
}

}
Also I get error when I compile the UARt initialization
Code: [Select]
QUEUE_HANDLE  fnOpenUART(void){
  TTYTABLE tInterfaceParameters;      // table for passing information to driver
  QUEUE_HANDLE SerialPortID;          // UART handle to be obtained during open
  tInterfaceParameters.Channel = 1;   // set UART channel for serial use
  tInterfaceParameters.ucSpeed = SERIAL_BAUD_57600;           // baud rate 19’200
  tInterfaceParameters.Rx_tx_sizes.RxQueueSize = 256;         // input buffer size
  tInterfaceParameters.Rx_tx_sizes.TxQueueSize = 512;         // output buffer size
  tInterfaceParameters.Task_to_wake = TASK_APPLICATION;       // wake task on rx

  tInterfaceParameters.usConfig =
                        (CHAR_8 + NO_PARITY + ONE_STOP + USE_XON_OFF + CHAR_MODE);

#ifdef SERIAL_SUPPORT_DMA
  tInterfaceParameters.ucDMAConfig = UART_TX_DMA;   // activate DMA on transmission
#endif
  if ((SerialPortID = fnOpen( TYPE_TTY, FOR_I_O, &tInterfaceParameters )) != 0) {
    // open the channel with defined configurations (initially inactive)
    fnDriver(SerialPortID, ( TX_ON | RX_ON ), 0 );  // enable rx and tx
  }
  return SerialPortID;               // return the serial port handle for this UART

please advise how I can make the above two code work.

6
µTasker general / utasker
« on: September 16, 2017, 10:27:12 AM »
Hi ,
I’m not expert in firmware and uTasker. My experience in firmware is in college couple years ago.
I've recently start working on project on M52235EVB  board and uTasker operating system. I need to do the following tasks and need direction how to do these simple task and appreciate any help here.
  • I need to get interrupt signal when I see rising edge of discrete signal and start recording data from Analog signal measurement every 20ms until I see the discreet signal goes low(I need to get interrupt to stop taking measurement when I see falling edge )
  • Then calculate the average and standard deviation once completed and send discrete signal if the values are above the set points.
  • Also need to setup the serial communication to send the set point values using simple command ( with unique header and trailer) and also send the data that was captured serially and also via Ethernet (UDP)  need to include the header and trailer when transmitting the data both serially and UDP.
  • I have 1 analog signal , 1 Digital input (DI) ,1 digital output(DO) and 1UART only and would like to disable the demo portion of uTasker on the evaluation board that are not related to my task.


Thank you in advance for your support.
Mamim

Pages: [1]