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

Pages: 1 2 [3] 4 5 ... 30
31
µTasker general / Re: Adding a delay without using a task
« on: October 20, 2017, 09:13:45 AM »
Hi Mark

  Thanks for that.

Best Regards
Neil

32
µTasker general / Re: Adding a delay without using a task
« on: October 14, 2017, 03:16:14 PM »
Hi Mark
  Thanks for the reply. I don’t exit the interupt while in the DCD_int(). I think I will poll the register . When setting up the interupt I set the callback , do I simply put NULL, or an empty callback function? What register do I poll ?

Regards
Neil

33
µTasker general / Re: Adding a delay without using a task
« on: October 14, 2017, 07:06:19 AM »
Hi Mark
  I just checked and and can confirm that within a pulse input routine (DCDPulse_int above) I called the delay function, and the timeout routine never gets called.

Regards
Neil

34
µTasker general / Re: Adding a delay without using a task
« on: October 13, 2017, 03:10:45 PM »
Hi Mark,
  The delay above works well until one point where the interrupt never gets called. I have an interrupt that is captured on the rising edge. And within this interrupt I send an I2C command and have a 10ms delay, but the timer interrupt never gets called.  Here is the code for capturing the rising edge.

GPTIMER_SETUP gptimer_setup; 
 
  gptimer_setup.int_type = GPT_TIMER_INTERRUPT;
    gptimer_setup.int_handler = DCDPulse_int;
    gptimer_setup.channel = 1;                                           // general purpose timer channel 1
    gptimer_setup.int_priority = GPTIMER0_INTERRUPT_PRIORITY;            // define interrupt priority
    gptimer_setup.mode = GPT_CAPTURE_RISING_EDGE; // set up capture mode and define the timer clock
    gptimer_setup.usCaptureCount = 0;                         // request this many capture values to be recorded before calling our interrupt
    gptimer_setup.capture_list = 0;                          // the capture list for saving to

   fnConfigureInterrupt((void *)&gptimer_setup);                       

I am using GPT0 , and GPT1 (MCF52559) as input captures.  I assume the above doesnt use any DMA timers?

Would I be correct in saying that a DMA timer , as above, cant be called withing a timer interrupt as above?

I have checked TEST_DMA_TIMER and its not enabled, but I couldnt find MONITOR_PERFORMANCE.

How many DMA timers can I use , and is not used by the system?


Many Thanks
Neil

35
µTasker general / Re: Adding a delay without using a task
« on: October 09, 2017, 04:59:37 PM »
Hi Mark
  Thanks for the reply.

I will use the event to fire when the interrupt fires in long delays. I use an external watchdog with a 3 second timeout, which is fired if there are any lock ups.  This gives me plenty of breathing space for SD card read/writes.

Thanks
Neil

36
µTasker general / Adding a delay without using a task
« on: October 09, 2017, 04:01:50 PM »
Hi Mark,
  I wish to have a function to simply have a delay before jumping to the next line. I have the below for adding a milli or micro second delay. How many channels in the timer are there used by utasker? Im using channel 1 , but dont know if there are others available.

Below I call the Delayms(.) for a delay, do you see any issues doing this?

Regards
Neil


volatile char DelayTimeout;
void Delayms(int Delay)
{
    DelayTimeout=0;
    SetOneShotTimerG2(Delay,1);
    while(!DelayTimeout)
      ;
}

void G2TimerProcedure(void)
{
  DelayTimeout=1;
}
 
void SetOneShotTimerG2(int Tme,char IsMS)
{
   DMA_TIMER_SETUP timer_setup;
   timer_setup.int_type = DMA_TIMER_INTERRUPT;                       
   timer_setup.channel = 1;          // timer channel
   timer_setup.int_priority = DMA_TIMER1_INTERRUPT_PRIORITY;
   timer_setup.int_handler = G2TimerProcedure;                // enter timer call-back
   timer_setup.mode = (DMA_TIMER_INTERNAL_CLOCK | DMA_TIMER_SINGLE_SHOT_INTERRUPT);
   if(IsMS)
    timer_setup.count_delay = DMA_TIMER_MS_DELAY(1,1,Tme);   
   else
    timer_setup.count_delay = DMA_TIMER_US_DELAY(1,1,Tme);   
   
   fnConfigureInterrupt((void *)&timer_setup);    
}

37
µTasker general / Re: Waiting for IIC to complete
« on: October 09, 2017, 03:02:14 PM »
Hi Mark,
  This way is fine for initialization, but there are times in the application where a few commands may be sent one after another. If I have delay task then it complicates my application as there may be many places where the commands may sent, and known where to go after the data is sent is tricky. I suppose I can have my own buffer , but this duplicates what the IIC task does (I think). Is there a way to tell the IIC routine to delay for x msec before sending the next packet?

Regards
Neil

38
µTasker general / Re: USB -> Serial Driver for Windows 8 & 10
« on: October 09, 2017, 01:25:05 PM »
Hi Mark,
  I tried it on Windows XP, but get the message 'The device cannot start. (Code 10)'. I have checked to make sure the VID and PID are the same, which they are. Works fine in Windows 10.

Regards
Neil

39
µTasker general / Re: USB -> Serial Driver for Windows 8 & 10
« on: October 06, 2017, 07:42:19 PM »
Hi Mark
 I also have many Windows XP users, setting DEVICE_CLASS_COMMUNICATION_AND_CONTROL,                              // 0x02, 0x02, 0x00 , will it still work okay?  Would you also have a good inf file for XP?

Many Thanks
Neil

40
µTasker general / USB -> Serial Driver for Windows 8 & 10
« on: October 06, 2017, 02:55:33 PM »
Hi
  Does anyone know if there is a stable USB -> Serial driver for Windows 8 & 10? I wish to use the USB port to connect to a serial port on the PC

Regards
Neil

41
µTasker general / Re: Waiting for IIC to complete
« on: October 05, 2017, 11:55:25 AM »
Hi Mark,
  Thanks for the reply, cheers.

I will use the timer method to send the commands, this sounds a cleaner approach.

Best Regards
Neil

42
µTasker general / Waiting for IIC to complete
« on: October 04, 2017, 09:58:25 AM »
Hi Mark
  I have connected an IIC that requires initialization of few registers. But there must be a delay in between each  call, see below. When the below is carried out, I assume it goes to a buffer where all is transmitted to the device. Is there a way I can poll a register to see if the 1st send is complete before continuing with the second?

Regards
Neil

unsigned char VAL[4];
VAL[0]=0x40;
 VAL[1]=0;
 VAL[2]=0x0; //set as output
 fnWrite(IICPortIDG2, (unsigned char *)VAL, 3);
 
//has to be a delay here....

VAL[1]=9;
VAL[2]=0;
fnWrite(IICPortIDG2, (unsigned char *)VAL, 3);

43
NXPTM M522XX, KINETIS and i.MX RT / Re: HID class on USB
« on: November 10, 2015, 11:37:16 PM »
Hi Mark
    is there a way to detect when an application (a Windows app) connects, and disconnects  to and from utasker?

regards
Neil

44
NXPTM M522XX, KINETIS and i.MX RT / Re: HID class on USB
« on: November 09, 2015, 11:39:26 PM »
Hi Mark
  I managed to find the issue, I increased the define HID_RAW_TX_SIZE from 32 to 64, and the demo works, I now get the characters displayed.  I found another Windows application , where it displays the size of the TX buffer of the device , and it has value of 32. The documentation mentions the size of the transmitted data has to be length HID_RAW_TX_SIZE. so when I sent 32 bytes the info was displayed on the Windows app. So when I increased it to 64 bytes , the demo app you mentioned worked. So it looks like the PC will always send 64 bytes of data , regardless the size to send. And utasker has to send back HID_RAW_TX_SIZE size of buffer.

regards
Neil

45
NXPTM M522XX, KINETIS and i.MX RT / Re: HID class on USB
« on: November 09, 2015, 03:39:14 PM »
Hi Mark,
  Thanks for the update, and your replies to my questions, cheers.  I look forward to findings in the next few days.

Regards
Neil

Pages: 1 2 [3] 4 5 ... 30