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
utFAT / latest version
« on: December 04, 2017, 03:01:58 PM »
Hi Mark,
  My current project is seeing a 8GB micro sd card as 4GB. Looking at the mass_storage.h header , it has :

   05.08.2014 Correct long file rename end of directory save            {1}
    15.08.2014 Corrected =! to !=                                        {2}
    29.08.2014 Correct creating additional directory clusters            {3}
    03.09.2014 Remove fnCreateFile(), fnSetFileLocation() and fnInsertLFN_name() parameter {4}
    03.09.2014 Reset any deleted location markers when moving to next paragraph {5}
    06.10.2014 Correct brackets in fnExtractLongFileName()                {6} [uFATV2.01]
[1] changes for formatting cards that previously didnt format.  . I think this was an update you gave me.


I tried copying over the files from the utasker demo that works, but got a heap of errors, see attached. 

As my own project is working well, I dont want to change over to a complete new utasker, I would like to just update the  mass_storage part.

Many Thanks
Neil

32
Hi Mark
  Thanks for that, much appreciated.

Best Regards
Neil

33
Hi Mark,
  I have been using CodeWarrior for Coldfire version 7.1 for years and I think I would like to move to the latest version. Is there any documents on how to convert my current projects of utasker to the latest version?

Many Thanks
Neil

34
µ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

35
µ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

36
µ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

37
µ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

38
µ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

39
µ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);    
}

40
µ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

41
µ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

42
µ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

43
µ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

44
µ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

45
µ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);

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