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

Pages: 1 [2]
16
NXPTM M522XX, KINETIS and i.MX RT / FTP File Download Across Multiple Flash
« on: September 27, 2011, 08:12:59 AM »
Hi All,

I am using uTasker v1.3_SP6 and I found that when I try to throw in a big file into SPI Flash that is located at end of 1st flash, continue to the start section of 2nd flash, the file transfer is corrupted. When I move the start of the file to point to start of 2nd flash, then the file can transfer without any problem.

Does anyone having similar problem? How should I solve this issue? Currently I am using MCF52233 with 2 SPI flash.

Thank you very much.

17
Hi All,

After adding the line as Mark suggest (EM_timer.count_delay = DMA_TIMER_US_DELAY(1,1,10);) it is working fine now.

Just some additional information, we can use DMA_TIMER_US_DELAY to get interval of uS or DMA_TIMER_MS_DELAY for mS interval.

My latest code as below, the the DMA timer set to 100mS timeout period:
//////////////////////////////////
static void EM4095TimerInt(void)
{
   tEM4095RunTime[0].timer_off = 1;
   uTaskerStateChange(OWN_TASK, UTASKER_GO);
}

static void EM4095_ConfigDMATimer(DMA_TIMER_SETUP * EM_timer)
{
    EM_timer->int_type = DMA_TIMER_INTERRUPT;                       
    EM_timer->channel = EM4095_DMA_TIMER_CHANNEL;                   
    EM_timer->int_priority = EM4095_DMA_TIMER_INTERRUPT_PRIORITY;
    EM_timer->int_handler = EM4095TimerInt;
    EM_timer->mode = (DMA_TIMER_INTERNAL_CLOCK_DIV_16|DMA_TIMER_PERIODIC_INTERRUPT|DMA_TIMER_RESTART_ON_MATCH);
  EM_timer->count_delay =DMA_TIMER_MS_DELAY(16,1,100)            // 100ms delay
}
//////////////////////////////////
Thank you very much. Now I manage to decode the Manchester Coding signal.


18
HI Mark,

Thanks for the information.

Below is the code I have tried:
////////////////////////////////////////////////
static void EM4095TimerInt(void)
{
   static U8_t i=0;
   
   DMA_TIMER_COUNTERS = 0;      //clear timer
   DMA_TIMER_EVENT = 0x03;      //clear event flag
   if(i)
   {
      OUT_EMSHD_ON;
      i=0;
   }
   else
   {
      OUT_EMSHD_OFF;
      i=1;
   }
}
static void EM4095_InitDMA(void)
{
    DMA_TIMER_SETUP EM_timer;
   
    EM_timer.int_type = DMA_TIMER_INTERRUPT;                       
    EM_timer.channel = EM4095_DMA_TIMER_CHANNEL;               
    EM_timer.int_priority = EM4095_DMA_TIMER_INTERRUPT_PRIORITY;
    EM_timer.int_handler = EM4095TimerInt;
    EM_timer.mode = (DMA_TIMER_INTERNAL_CLOCK|DMA_TIMER_PERIODIC_INTERRUPT);
   
   
   fnConfigureInterrupt((void *)&EM_timer);
}
//////////////////////////////
With above code, from scope measure a 100uS interval, please advice what further settings is require to get smaller interval, said 10uS.

Thank you very much.

19
Hi All,

I am utasker on M5223X device. Now I need to decode a waveform using manchester coding method, the incoming waveform have a valid pulse width of 250us. I have tried to use hardware timer as below to tried to generated 10us interval but not successful, the below code can only give me a timeout in a period of about 200us(measure using a oscilloscope). As the pulse width is 250us, i may need to accept the pulse width between 200us - 300us as a valid incoming signal.

#define MILLISEC               MED_RES_MS
uTaskerGlobalMonoTimer( (UTASK_TASK)(OWN_TASK | HARDWARE_TIMER), (CLOCK_LIMIT)(0.01*MILLISEC),  E_TIMER_TEST_3MS );  // restart 3ms timer

I have tried to use a count down timer to obtain the period between incoming state change (either from high to low or low to high), I cannot get this method to work as the timer accuracy i get is too low (200us) where I need higher timer accuracy.

Please advice how I should do in order to correctly decoding the incoming manchester coding waveform.

Thank you very much.

20
µTasker general / uNetwork
« on: March 26, 2010, 12:28:07 PM »
HI All,

I would like to enable my controller to talk to each other in network environment and I found uNetwork can actually implemented that. Each of the controller will have its own MAC and IP address.

However, after read through the documentation, I still not understand the following
1. Said I have 3 device/node on the network that will be talking to each other, what should be the correct setting for each of them on
    OurConfigNr
    OurNetworkNumber
    ucNodeMac

    Let said the IP and MAC for the 3 devices is as below
    MAC : 0.0.0.0.0.1 IP : 192.168.0.1
    MAC : 0.0.0.0.0.2 IP : 192.168.0.2
    MAC : 0.0.0.0.0.3 IP : 192.168.0.3
2. What function should I call to send data from current device to another device?
3. Where should I add code that will process data received sent by another device?
4. Is there any notification of success of data sending and which portion of code I should add to process this information.
5. If data is send from current device to another device, is it possible for another device to feedback to current device and I further process feedback from another device?

Thank you very much.

Pages: 1 [2]